File tree Expand file tree Collapse file tree 2 files changed +22
-22
lines changed Expand file tree Collapse file tree 2 files changed +22
-22
lines changed Original file line number Diff line number Diff line change 58
58
have been registered with CEREAL_REGISTER_ARCHIVE. This must be called
59
59
after all archives are registered (usually after the archives themselves
60
60
have been included). */
61
- #define CEREAL_BIND_TO_ARCHIVES (T ) \
62
- namespace cereal { \
63
- namespace detail { \
64
- template <> \
65
- struct init_binding <T > { \
66
- static bind_to_archives<T > const & b; \
67
- static void unused () { (void )b; } \
68
- }; \
69
- bind_to_archives<T > const & init_binding<T >::b = \
70
- ::cereal::detail::StaticObject< \
71
- bind_to_archives<T> \
72
- >::getInstance().bind(); \
61
+ #define CEREAL_BIND_TO_ARCHIVES (...) \
62
+ namespace cereal { \
63
+ namespace detail { \
64
+ template <> \
65
+ struct init_binding <__VA_ARGS__ > { \
66
+ static bind_to_archives<__VA_ARGS__ > const & b; \
67
+ static void unused () { (void )b; } \
68
+ }; \
69
+ bind_to_archives<__VA_ARGS__ > const & init_binding<__VA_ARGS__ >::b = \
70
+ ::cereal::detail::StaticObject< \
71
+ bind_to_archives<__VA_ARGS__> \
72
+ >::getInstance().bind(); \
73
73
}} /* end namespaces */
74
74
75
75
namespace cereal
Original file line number Diff line number Diff line change 79
79
80
80
Polymorphic support in cereal requires RTTI to be
81
81
enabled */
82
- #define CEREAL_REGISTER_TYPE (T ) \
83
- namespace cereal { \
84
- namespace detail { \
85
- template <> \
86
- struct binding_name <T > \
87
- { \
88
- STATIC_CONSTEXPR char const * name () { return #T ; } \
89
- }; \
90
- } } /* end namespaces */ \
91
- CEREAL_BIND_TO_ARCHIVES (T )
82
+ #define CEREAL_REGISTER_TYPE (...) \
83
+ namespace cereal { \
84
+ namespace detail { \
85
+ template <> \
86
+ struct binding_name <__VA_ARGS__ > \
87
+ { \
88
+ STATIC_CONSTEXPR char const * name () { return #__VA_ARGS__ ; } \
89
+ }; \
90
+ } } /* end namespaces */ \
91
+ CEREAL_BIND_TO_ARCHIVES (__VA_ARGS__ )
92
92
93
93
// ! Registers a polymorphic type with cereal, giving it a
94
94
// ! user defined name
You can’t perform that action at this time.
0 commit comments