test_const_save_warn1_nvp.cpp 708 B

1234567891011121314151617181920212223242526
  1. /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
  2. // test_const.cpp
  3. // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
  4. // Use, modification and distribution is subject to the Boost Software
  5. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. // compile only
  8. #include <boost/archive/text_oarchive.hpp>
  9. #include <boost/serialization/nvp.hpp>
  10. #include <boost/serialization/tracking.hpp>
  11. using namespace boost::archive;
  12. struct A {
  13. template<class Archive>
  14. void serialize(Archive & ar, unsigned int version) {
  15. }
  16. };
  17. void f1(text_oarchive & oa, A & a){
  18. oa << BOOST_SERIALIZATION_NVP(a);
  19. }