
15 Apr
2004
15 Apr
'04
3:42 p.m.
"Allen Yao" <yaozhen@ustc.edu> wrote
I suggest that a traits class to be used by the user instead of macros like BOOST_SERIALIZATION_SPLIT_FREE. For example, the traits class can be named "serialization_traits", its default implementation is somthing as follows:
template <typename T> struct serialization_traits { static const bool has_split_load_save = false; };
I wrote write small functions like: template<typename Archive> bool is_loading(const Archive& arch) { bool is_iarchive = boost::is_base_and_derived<boost::archive::basic_iarchive, Archive>::value; return is_iarchive; } to deal with this. It could be useful to have these in library. /Pavel