#include #include #include #include using namespace std; class non_def_ctable { private: friend class boost::serialization::access; template void serialize(Archive& ar, const unsigned int) { ar & BOOST_SERIALIZATION_NVP( value ); } int value; public: non_def_ctable() = delete; non_def_ctable(int arg_value) : value( arg_value ) {} }; namespace boost { namespace serialization { template inline void load_construct_data(Archive &, non_def_ctable * t, const unsigned int ) { ::new(t)non_def_ctable( 0 ); } } } int main() { ifstream the_input_stream; boost::archive::xml_iarchive the_input_archive( the_input_stream ); vector non_def_ctables; the_input_archive & BOOST_SERIALIZATION_NVP( non_def_ctables ); }