mirror of
https://github.com/USCiLab/cereal.git
synced 2025-10-18 01:45:52 +02:00
@@ -800,6 +800,18 @@ namespace cereal
|
||||
|
||||
See notes from member load_minimal implementation.
|
||||
|
||||
Note that there should be an additional const check on load_minimal after the valid check,
|
||||
but this currently interferes with many valid uses of minimal serialization. It has been
|
||||
removed (see #565 on github) and previously was:
|
||||
|
||||
@code
|
||||
static_assert( check::const_valid || !check::exists,
|
||||
"cereal detected an invalid serialization type parameter in non-member " #test_name ". "
|
||||
#test_name " non-member functions must accept their serialization type by non-const reference" );
|
||||
@endcode
|
||||
|
||||
See #132, #436, #263, and #565 on https://github.com/USCiLab/cereal for more details.
|
||||
|
||||
@param test_name The name to give the test (e.g. load_minimal or versioned_load_minimal)
|
||||
@param save_name The corresponding name the save test would have (e.g. save_minimal or versioned_save_minimal)
|
||||
@param versioned Either blank or the macro CEREAL_MAKE_VERSIONED_TEST */
|
||||
@@ -847,9 +859,6 @@ namespace cereal
|
||||
static_assert( check::valid || !check::exists, "cereal detected different types in corresponding non-member " \
|
||||
#test_name " and " #save_name " functions. \n " \
|
||||
"the paramater to " #test_name " must be a constant reference to the type that " #save_name " returns." ); \
|
||||
static_assert( check::const_valid || !check::exists, \
|
||||
"cereal detected an invalid serialization type parameter in non-member " #test_name ". " \
|
||||
#test_name " non-member functions must accept their serialization type by non-const reference" ); \
|
||||
}; \
|
||||
} /* namespace detail */ \
|
||||
\
|
||||
|
||||
Reference in New Issue
Block a user