Update contrib.
1 #ifndef BOOST_ARCHIVE_TEXT_WIARCHIVE_HPP
2 #define BOOST_ARCHIVE_TEXT_WIARCHIVE_HPP
4 // MS compatible compilers support #pragma once
5 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
12 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
13 // Use, modification and distribution is subject to the Boost Software
14 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
15 // http://www.boost.org/LICENSE_1_0.txt)
17 // See http://www.boost.org for updates, documentation, and revision history.
19 #include <boost/config.hpp>
20 #ifdef BOOST_NO_STD_WSTREAMBUF
21 #error "wide char i/o not supported on this platform"
26 #include <boost/archive/detail/auto_link_warchive.hpp>
27 #include <boost/archive/basic_text_iprimitive.hpp>
28 #include <boost/archive/basic_text_iarchive.hpp>
30 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
35 template<class Archive>
36 class text_wiarchive_impl :
37 public basic_text_iprimitive<std::wistream>,
38 public basic_text_iarchive<Archive>
40 #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
43 friend class detail::interface_iarchive<Archive>;
44 friend class basic_text_iarchive<Archive>;
45 friend class load_access;
50 basic_text_iprimitive<std::wistream>::load(t);
52 BOOST_WARCHIVE_DECL(void)
54 #ifndef BOOST_NO_INTRINSIC_WCHAR_T
55 BOOST_WARCHIVE_DECL(void)
58 BOOST_WARCHIVE_DECL(void)
60 #ifndef BOOST_NO_STD_WSTRING
61 BOOST_WARCHIVE_DECL(void)
62 load(std::wstring &ws);
64 // note: the following should not needed - but one compiler (vc 7.1)
65 // fails to compile one test (test_shared_ptr) without it !!!
67 void load_override(T & t, BOOST_PFTO int){
68 basic_text_iarchive<Archive>::load_override(t, 0);
70 BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY())
71 text_wiarchive_impl(std::wistream & is, unsigned int flags);
72 ~text_wiarchive_impl(){};
75 // do not derive from this class. If you want to extend this functionality
76 // via inhertance, derived from text_wiarchive_impl instead. This will
77 // preserve correct static polymorphism.
78 class text_wiarchive :
79 public text_wiarchive_impl<text_wiarchive>
82 text_wiarchive(std::wistream & is, unsigned int flags = 0) :
83 text_wiarchive_impl<text_wiarchive>(is, flags)
88 } // namespace archive
91 // required by smart_cast for compilers not implementing
92 // partial template specialization
93 BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::text_wiarchive)
95 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
97 #endif // BOOST_NO_STD_WSTREAMBUF
98 #endif // BOOST_ARCHIVE_TEXT_WIARCHIVE_HPP