mirror of
https://github.com/USCiLab/cereal.git
synced 2025-10-18 01:45:52 +02:00
Working on type traits for Boost Transition Layer
This commit is contained in:
23
sandbox.cpp
23
sandbox.cpp
@@ -380,6 +380,26 @@ void test_unordered_loads()
|
||||
}
|
||||
}
|
||||
|
||||
struct BoostTransitionMS
|
||||
{
|
||||
BoostTransitionMS( int xx ) : x(xx) {}
|
||||
|
||||
int x;
|
||||
|
||||
//template <class Archive>
|
||||
//void serialize( Archive & ar )
|
||||
//{
|
||||
// ar( x );
|
||||
//}
|
||||
|
||||
template <class Archive>
|
||||
void serialize( Archive & ar, const std::uint32_t version )
|
||||
{
|
||||
std::cout << "BoostTransitionMS " << version << std::endl;
|
||||
ar( x );
|
||||
}
|
||||
};
|
||||
|
||||
// ######################################################################
|
||||
int main()
|
||||
{
|
||||
@@ -652,7 +672,8 @@ int main()
|
||||
}
|
||||
|
||||
std::cerr << "-------------------------" << std::endl;
|
||||
test_unordered_loads<cereal::XMLInputArchive, cereal::XMLOutputArchive>();
|
||||
std::cout << cereal::traits::has_member_serialize<BoostTransitionMS, cereal::BinaryOutputArchive>() << std::endl;
|
||||
std::cout << cereal::traits::has_member_versioned_serialize<BoostTransitionMS, cereal::BinaryOutputArchive>() << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user