
Pavel Vozenilek wrote:
"Robert Ramey" wrote:
a) I'm not sure about the portability of enable_if. Would this not break the whole serialization system for those compilers which don't support it?
Yes: BCB, VC6, VC7 as example.
FWIW, you don't need enable_if<> for this. Just use tag-dispatching: template<class Archive, class U> inline void save_aux( Archive & ar, const STD::valarray<U> &t, const , unsigned int file_version , mpl::true_ ) { ... } template<class Archive, class U> inline void save_aux( Archive & ar, const STD::valarray<U> &t, const , unsigned int file_version , mpl::false_ ) { ... } template<class Archive, class U> inline void save( Archive & ar, const STD::valarray<U> &t, const , unsigned int file_version ) { save_aux( ar, t, file_version , boost::archive::has_fast_array_serialization<Archive,U>() ); } -- Daniel Wallin