Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2004-04-15 10:42:22


"Allen Yao" <yaozhen_at_[hidden]> 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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk