We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a782e4 commit 37057bdCopy full SHA for 37057bd
test/test_xml.cpp
@@ -55,6 +55,28 @@ TEST_CASE("simple test") {
55
}
56
57
58
+template <class T>
59
+struct Haha {
60
+ std::string msg;
61
+ YLT_REFL(Haha, msg);
62
+};
63
+
64
+template <typename T>
65
+inline constexpr std::string_view get_alias_struct_name(Haha<T> *) {
66
+ return "haha";
67
+}
68
69
+TEST_CASE("template class test") {
70
+ Haha<int> ha{"test"};
71
+ std::string ss;
72
+ iguana::to_xml(ha, ss);
73
+ std::cout << ss << "\n";
74
75
+ Haha<int> ha1{};
76
+ iguana::from_xml(ha1, ss);
77
+ CHECK(ha1.msg == ha.msg);
78
79
80
struct optional_t {
81
int a;
82
std::optional<int> b;
0 commit comments