You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Tutorial is provided to give you a view of how *iguana* works for serialization.
30
34
@@ -38,10 +42,12 @@ struct person
38
42
std::string name;
39
43
int age;
40
44
};
41
-
REFLECTION(person, name, age) //define meta data
45
+
#if __cplusplus >= 202002L
46
+
YLT_REFL(person, name, age) //define meta data
47
+
#endif
42
48
```
43
49
44
-
Defining meta data is very simple, and just needs to define in a `REFLECTION` macro.
50
+
Defining meta data is very simple, if your compiler is C++20 compiler(gcc11+, clang13+, msvc2022), no need define YLT_REFL, other wise need to define in a `YLT_REFL` macro.
test_macro_generator.cpp will be unchanged, have_macro.cpp will be changed to source file with REFLECTION macro.
415
+
test_macro_generator.cpp will be unchanged, have_macro.cpp will be changed to source file with YLT_REFL macro.
410
416
411
417
scripts works out of the box with Python version 2.7 and 3.x on any platform.
412
418
@@ -417,7 +423,7 @@ Notes: In Python3,Will prompt `DeprecationWarning: 'U' mode is deprecated`.Ignor
417
423
418
424
- **Question**: Why is the library called *iguana*?
419
425
420
-
- **Answer**: I think serialization is like an iguana, because the only difference is the displaying format, however the meta data is never changed. With changeless meta data and reflection, you can serialize an object to any format, which is like how an iguana does.
426
+
- **Answer**: I think serialization is like an iguana, because the only difference is the displaying format, however the meta data is never changed. With changeless meta data and YLT_REFL, you can serialize an object to any format, which is like how an iguana does.
421
427
422
428
- **Question**: Does *iguana* support raw pointer?
0 commit comments