kokkos-execution
0.0.1
Toggle main menu visibility
Loading...
Searching...
No Matches
test_reflection.cpp
Go to the documentation of this file.
1
#include <concepts>
2
#include <meta>
3
#include <string_view>
4
5
#include "gtest/gtest.h"
6
17
18
namespace
Tests::Std
{
19
20
template
<
typename
T>
21
struct
MyType
{ };
22
24
consteval
bool
test_display_string_of
() {
25
constexpr
auto
str_of = std::meta::display_string_of(^^
MyType<int>
);
26
27
static_assert
(std::same_as<
decltype
(str_of),
const
std::string_view>);
28
29
static_assert
(str_of ==
"Tests::Std::MyType<int>"
);
30
31
return
true
;
32
}
33
34
static_assert
(
test_display_string_of
());
35
37
TEST(ReflectionTest, display_string_of) {
38
std::cout << std::meta::display_string_of(^^
MyType<int>
) << std::endl;
39
}
40
41
}
// namespace Tests::Std
Tests::Std
Definition
test_constexpr_exception.cpp:19
Tests::Std::test_display_string_of
consteval bool test_display_string_of()
Definition
test_reflection.cpp:24
Tests::Std::MyType
Definition
test_reflection.cpp:21
tests
std
test_reflection.cpp
Generated on
for kokkos-execution by
1.18.0