diff --git a/Jamroot b/Jamroot index 4e913c2b..42a0af60 100644 --- a/Jamroot +++ b/Jamroot @@ -144,9 +144,12 @@ import option ; import tools/boost\_install/boost-install ; path-constant BOOST_ROOT : . ; -constant BOOST_VERSION : 1.71.0 ; +constant BOOST_VERSION : 1.80.0 ; constant BOOST_JAMROOT_MODULE : $(__name__) ; +# Allow subprojects to simply `import config : requires ;` to get access to the requires rule +modules.poke : BOOST_BUILD_PATH : $(BOOST_ROOT)/libs/config/checks [ modules.peek : BOOST_BUILD_PATH ] ; + boostcpp.set-version $(BOOST_VERSION) ; use-project /boost/architecture : libs/config/checks/architecture ; @@ -210,18 +213,15 @@ rule handle-static-runtime ( properties * ) # dangerous on Windows. Therefore, we disallow it. This might be drastic, # but it was disabled for a while without anybody complaining. - # For CW, static runtime is needed so that std::locale works. - if shared in $(properties) && static in $(properties) && - ! ( cw in $(properties) ) - { - if ! $(.shared-static-warning-emitted) - { - ECHO "warning: skipping configuration link=shared, runtime-link=static" ; - ECHO "warning: this combination is either impossible or too dangerous" ; - ECHO "warning: to be of any use" ; - .shared-static-warning-emitted = 1 ; - } + local argv = [ modules.peek : ARGV ] ; + if shared in $(properties) + && static in $(properties) + # For CW, static runtime is needed so that std::locale works. + && ! ( cw in $(properties) ) + && ! --allow-shared-static in $(argv) + { + boostcpp.emit-shared-static-warning ; return no ; } } diff --git a/boost/algorithm/string/compare.hpp b/boost/algorithm/string/compare.hpp index 734303a9..dc34007c 100644 --- a/boost/algorithm/string/compare.hpp +++ b/boost/algorithm/string/compare.hpp @@ -65,7 +65,7 @@ namespace boost { template< typename T1, typename T2 > bool operator()( const T1& Arg1, const T2& Arg2 ) const { - #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + #if defined(BOOST_BORLANDC) && (BOOST_BORLANDC >= 0x560) && (BOOST_BORLANDC <= 0x564) && !defined(_USE_OLD_RW_STL) return std::toupper(Arg1)==std::toupper(Arg2); #else return std::toupper(Arg1,m_Loc)==std::toupper(Arg2,m_Loc); @@ -118,7 +118,7 @@ namespace boost { template< typename T1, typename T2 > bool operator()( const T1& Arg1, const T2& Arg2 ) const { - #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + #if defined(BOOST_BORLANDC) && (BOOST_BORLANDC >= 0x560) && (BOOST_BORLANDC <= 0x564) && !defined(_USE_OLD_RW_STL) return std::toupper(Arg1)(Arg1,m_Loc)(Arg2,m_Loc); @@ -171,7 +171,7 @@ namespace boost { template< typename T1, typename T2 > bool operator()( const T1& Arg1, const T2& Arg2 ) const { - #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + #if defined(BOOST_BORLANDC) && (BOOST_BORLANDC >= 0x560) && (BOOST_BORLANDC <= 0x564) && !defined(_USE_OLD_RW_STL) return std::toupper(Arg1)<=std::toupper(Arg2); #else return std::toupper(Arg1,m_Loc)<=std::toupper(Arg2,m_Loc); diff --git a/boost/algorithm/string/detail/case_conv.hpp b/boost/algorithm/string/detail/case_conv.hpp index 233912ca..188602a1 100644 --- a/boost/algorithm/string/detail/case_conv.hpp +++ b/boost/algorithm/string/detail/case_conv.hpp @@ -15,6 +15,9 @@ #include #include +#include +#include +#include #include namespace boost { @@ -40,7 +43,7 @@ namespace boost { // Operation CharT operator ()( CharT Ch ) const { - #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + #if defined(BOOST_BORLANDC) && (BOOST_BORLANDC >= 0x560) && (BOOST_BORLANDC <= 0x564) && !defined(_USE_OLD_RW_STL) return std::tolower( static_cast::type> ( Ch )); #else return std::tolower( Ch, *m_Loc ); @@ -62,7 +65,7 @@ namespace boost { // Operation CharT operator ()( CharT Ch ) const { - #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + #if defined(BOOST_BORLANDC) && (BOOST_BORLANDC >= 0x560) && (BOOST_BORLANDC <= 0x564) && !defined(_USE_OLD_RW_STL) return std::toupper( static_cast::type> ( Ch )); #else return std::toupper( Ch, *m_Loc ); diff --git a/boost/algorithm/string/detail/find_format_all.hpp b/boost/algorithm/string/detail/find_format_all.hpp index 52930c83..311fa26f 100644 --- a/boost/algorithm/string/detail/find_format_all.hpp +++ b/boost/algorithm/string/detail/find_format_all.hpp @@ -18,6 +18,8 @@ #include #include +#include + namespace boost { namespace algorithm { namespace detail { diff --git a/boost/algorithm/string/detail/finder.hpp b/boost/algorithm/string/detail/finder.hpp index a2a95821..8e70240d 100644 --- a/boost/algorithm/string/detail/finder.hpp +++ b/boost/algorithm/string/detail/finder.hpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include @@ -127,8 +127,8 @@ namespace boost { if( boost::empty(m_Search) ) return result_type( End, End ); - typedef BOOST_STRING_TYPENAME boost::detail:: - iterator_traits::iterator_category category; + typedef BOOST_STRING_TYPENAME + std::iterator_traits::iterator_category category; return findit( Begin, End, category() ); } @@ -344,9 +344,8 @@ namespace boost { typedef iterator_range result_type; input_iterator_type It=Begin; - for( - unsigned int Index=0; - Index::iterator_category category; + typedef BOOST_STRING_TYPENAME + std::iterator_traits::iterator_category category; return ::boost::algorithm::detail::find_head_impl( Begin, End, N, category() ); } @@ -397,10 +396,12 @@ namespace boost { input_iterator_type It2=Begin; // Advance It2 by N increments - for( Index=0; Index result_type; input_iterator_type It=End; - for( - unsigned int Index=0; - Index::iterator_category category; + typedef BOOST_STRING_TYPENAME + std::iterator_traits::iterator_category category; return ::boost::algorithm::detail::find_tail_impl( Begin, End, N, category() ); } diff --git a/boost/algorithm/string/detail/formatter.hpp b/boost/algorithm/string/detail/formatter.hpp index c071822f..f4c6728b 100644 --- a/boost/algorithm/string/detail/formatter.hpp +++ b/boost/algorithm/string/detail/formatter.hpp @@ -42,7 +42,7 @@ namespace boost { m_Format(::boost::begin(Format), ::boost::end(Format)) {} // Operation -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) template result_type& operator()(const Range2T&) { diff --git a/boost/algorithm/string/find_format.hpp b/boost/algorithm/string/find_format.hpp index 0e84a4ee..4d9315cb 100644 --- a/boost/algorithm/string/find_format.hpp +++ b/boost/algorithm/string/find_format.hpp @@ -12,7 +12,6 @@ #define BOOST_STRING_FIND_FORMAT_HPP #include -#include #include #include #include @@ -40,7 +39,7 @@ namespace boost { this substring and replace it in the input. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. - + \param Output An output iterator to which the result will be copied \param Input An input sequence \param Finder A Finder object used to search for a match to be replaced diff --git a/boost/algorithm/string/formatter.hpp b/boost/algorithm/string/formatter.hpp index de8681bc..0e08ae7b 100644 --- a/boost/algorithm/string/formatter.hpp +++ b/boost/algorithm/string/formatter.hpp @@ -11,7 +11,6 @@ #ifndef BOOST_STRING_FORMATTER_HPP #define BOOST_STRING_FORMATTER_HPP -#include #include #include #include diff --git a/boost/align/align.hpp b/boost/align/align.hpp new file mode 100644 index 00000000..92f0c616 --- /dev/null +++ b/boost/align/align.hpp @@ -0,0 +1,19 @@ +/* +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_ALIGN_HPP +#define BOOST_ALIGN_ALIGN_HPP + +#include + +#if !defined(BOOST_NO_CXX11_STD_ALIGN) && !defined(BOOST_LIBSTDCXX_VERSION) +#include +#else +#include +#endif + +#endif diff --git a/boost/align/aligned_alloc.hpp b/boost/align/aligned_alloc.hpp new file mode 100644 index 00000000..1d81a133 --- /dev/null +++ b/boost/align/aligned_alloc.hpp @@ -0,0 +1,47 @@ +/* +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_ALIGNED_ALLOC_HPP +#define BOOST_ALIGN_ALIGNED_ALLOC_HPP + +#include + +#if defined(BOOST_HAS_UNISTD_H) +#include +#endif + +#if defined(__APPLE__) || defined(__APPLE_CC__) || defined(macintosh) +#include +#endif + +#if defined(BOOST_ALIGN_USE_ALIGN) +#include +#elif defined(BOOST_ALIGN_USE_NEW) +#include +#elif defined(_MSC_VER) && !defined(UNDER_CE) +#include +#elif defined(__MINGW32__) && (__MSVCRT_VERSION__ >= 0x0700) +#include +#elif defined(__MINGW32__) +#include +#elif MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 +#include +#elif MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 +#include +#elif defined(__ANDROID__) +#include +#elif defined(__SunOS_5_11) || defined(__SunOS_5_12) +#include +#elif defined(sun) || defined(__sun) +#include +#elif (_POSIX_C_SOURCE >= 200112L) || (_XOPEN_SOURCE >= 600) +#include +#else +#include +#endif + +#endif diff --git a/boost/align/alignment_of.hpp b/boost/align/alignment_of.hpp new file mode 100644 index 00000000..b7c50f1a --- /dev/null +++ b/boost/align/alignment_of.hpp @@ -0,0 +1,54 @@ +/* +Copyright 2014-2016 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_ALIGNMENT_OF_HPP +#define BOOST_ALIGN_ALIGNMENT_OF_HPP + +#include +#include + +#if defined(_MSC_VER) && defined(__clang__) +#include +#elif defined(BOOST_MSVC) +#include +#elif defined(__GNUC__) && defined(__unix__) && !defined(__LP64__) +#include +#elif defined(BOOST_CLANG) && !defined(__x86_64__) +#include +#elif !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) +#include +#elif defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600) +#include +#elif defined(BOOST_CODEGEARC) +#include +#elif defined(BOOST_CLANG) +#include +#elif __GNUC__ > 4 +#include +#elif (__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) +#include +#else +#include +#endif + +namespace boost { +namespace alignment { + +template +struct alignment_of + : detail::alignment_of::type>::type { }; + +#if !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES) +template +constexpr std::size_t alignment_of_v = alignment_of::value; +#endif + +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/alignment_of_forward.hpp b/boost/align/alignment_of_forward.hpp new file mode 100644 index 00000000..31db15f2 --- /dev/null +++ b/boost/align/alignment_of_forward.hpp @@ -0,0 +1,20 @@ +/* +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_ALIGNMENT_OF_FORWARD_HPP +#define BOOST_ALIGN_ALIGNMENT_OF_FORWARD_HPP + +namespace boost { +namespace alignment { + +template +struct alignment_of; + +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/align.hpp b/boost/align/detail/align.hpp new file mode 100644 index 00000000..77b327a2 --- /dev/null +++ b/boost/align/detail/align.hpp @@ -0,0 +1,38 @@ +/* +Copyright 2014-2020 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGN_HPP +#define BOOST_ALIGN_DETAIL_ALIGN_HPP + +#include +#include + +namespace boost { +namespace alignment { + +inline void* +align(std::size_t alignment, std::size_t size, void*& ptr, + std::size_t& space) +{ + BOOST_ASSERT(boost::alignment::detail::is_alignment(alignment)); + if (size <= space) { + char* p = reinterpret_cast(~(alignment - 1) & + (reinterpret_cast(ptr) + alignment - 1)); + std::size_t n = p - static_cast(ptr); + if (n <= space - size) { + ptr = p; + space -= n; + return p; + } + } + return 0; +} + +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/align_cxx11.hpp b/boost/align/detail/align_cxx11.hpp new file mode 100644 index 00000000..637541ab --- /dev/null +++ b/boost/align/detail/align_cxx11.hpp @@ -0,0 +1,21 @@ +/* +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP +#define BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP + +#include + +namespace boost { +namespace alignment { + +using std::align; + +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/aligned_alloc.hpp b/boost/align/detail/aligned_alloc.hpp new file mode 100644 index 00000000..d27a5499 --- /dev/null +++ b/boost/align/detail/aligned_alloc.hpp @@ -0,0 +1,52 @@ +/* +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_HPP +#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_HPP + +#include +#include +#include +#include +#include + +namespace boost { +namespace alignment { + +inline void* +aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT +{ + BOOST_ASSERT(detail::is_alignment(alignment)); + enum { + N = alignment_of::value + }; + if (alignment < N) { + alignment = N; + } + std::size_t n = size + alignment - N; + void* p = std::malloc(sizeof(void*) + n); + if (p) { + void* r = static_cast(p) + sizeof(void*); + (void)boost::alignment::align(alignment, size, r, n); + *(static_cast(r) - 1) = p; + p = r; + } + return p; +} + +inline void +aligned_free(void* ptr) BOOST_NOEXCEPT +{ + if (ptr) { + std::free(*(static_cast(ptr) - 1)); + } +} + +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/aligned_alloc_android.hpp b/boost/align/detail/aligned_alloc_android.hpp new file mode 100644 index 00000000..4119fbd9 --- /dev/null +++ b/boost/align/detail/aligned_alloc_android.hpp @@ -0,0 +1,34 @@ +/* +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_ANDROID_HPP +#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_ANDROID_HPP + +#include +#include +#include + +namespace boost { +namespace alignment { + +inline void* +aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT +{ + BOOST_ASSERT(detail::is_alignment(alignment)); + return ::memalign(alignment, size); +} + +inline void +aligned_free(void* ptr) BOOST_NOEXCEPT +{ + ::free(ptr); +} + +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/aligned_alloc_macos.hpp b/boost/align/detail/aligned_alloc_macos.hpp new file mode 100644 index 00000000..76366fa5 --- /dev/null +++ b/boost/align/detail/aligned_alloc_macos.hpp @@ -0,0 +1,44 @@ +/* +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MACOS_HPP +#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MACOS_HPP + +#include +#include +#include + +namespace boost { +namespace alignment { + +inline void* +aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT +{ + BOOST_ASSERT(detail::is_alignment(alignment)); + if (size == 0) { + return 0; + } + if (alignment < sizeof(void*)) { + alignment = sizeof(void*); + } + void* p; + if (::posix_memalign(&p, alignment, size) != 0) { + p = 0; + } + return p; +} + +inline void +aligned_free(void* ptr) BOOST_NOEXCEPT +{ + ::free(ptr); +} + +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/aligned_alloc_mingw.hpp b/boost/align/detail/aligned_alloc_mingw.hpp new file mode 100644 index 00000000..36be3d5f --- /dev/null +++ b/boost/align/detail/aligned_alloc_mingw.hpp @@ -0,0 +1,34 @@ +/* +Copyright 2020 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MINGW_HPP +#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MINGW_HPP + +#include +#include +#include + +namespace boost { +namespace alignment { + +inline void* +aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT +{ + BOOST_ASSERT(detail::is_alignment(alignment)); + return ::__mingw_aligned_malloc(size, alignment); +} + +inline void +aligned_free(void* ptr) BOOST_NOEXCEPT +{ + ::__mingw_aligned_free(ptr); +} + +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/aligned_alloc_msvc.hpp b/boost/align/detail/aligned_alloc_msvc.hpp new file mode 100644 index 00000000..45c57c99 --- /dev/null +++ b/boost/align/detail/aligned_alloc_msvc.hpp @@ -0,0 +1,34 @@ +/* +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MSVC_HPP +#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MSVC_HPP + +#include +#include +#include + +namespace boost { +namespace alignment { + +inline void* +aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT +{ + BOOST_ASSERT(detail::is_alignment(alignment)); + return ::_aligned_malloc(size, alignment); +} + +inline void +aligned_free(void* ptr) BOOST_NOEXCEPT +{ + ::_aligned_free(ptr); +} + +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/aligned_alloc_new.hpp b/boost/align/detail/aligned_alloc_new.hpp new file mode 100644 index 00000000..a97da65d --- /dev/null +++ b/boost/align/detail/aligned_alloc_new.hpp @@ -0,0 +1,52 @@ +/* +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_NEW_HPP +#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_NEW_HPP + +#include +#include +#include +#include +#include + +namespace boost { +namespace alignment { + +inline void* +aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT +{ + BOOST_ASSERT(detail::is_alignment(alignment)); + enum { + N = alignment_of::value + }; + if (alignment < N) { + alignment = N; + } + std::size_t n = size + alignment - N; + void* p = ::operator new(sizeof(void*) + n, std::nothrow); + if (p) { + void* r = static_cast(p) + sizeof(void*); + (void)boost::alignment::align(alignment, size, r, n); + *(static_cast(r) - 1) = p; + p = r; + } + return p; +} + +inline void +aligned_free(void* ptr) BOOST_NOEXCEPT +{ + if (ptr) { + ::operator delete(*(static_cast(ptr) - 1)); + } +} + +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/aligned_alloc_posix.hpp b/boost/align/detail/aligned_alloc_posix.hpp new file mode 100644 index 00000000..78fc842d --- /dev/null +++ b/boost/align/detail/aligned_alloc_posix.hpp @@ -0,0 +1,41 @@ +/* +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_POSIX_HPP +#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_POSIX_HPP + +#include +#include +#include + +namespace boost { +namespace alignment { + +inline void* +aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT +{ + BOOST_ASSERT(detail::is_alignment(alignment)); + if (alignment < sizeof(void*)) { + alignment = sizeof(void*); + } + void* p; + if (::posix_memalign(&p, alignment, size) != 0) { + p = 0; + } + return p; +} + +inline void +aligned_free(void* ptr) BOOST_NOEXCEPT +{ + ::free(ptr); +} + +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/aligned_alloc_sunos.hpp b/boost/align/detail/aligned_alloc_sunos.hpp new file mode 100644 index 00000000..0948b40e --- /dev/null +++ b/boost/align/detail/aligned_alloc_sunos.hpp @@ -0,0 +1,34 @@ +/* +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_SUNOS_HPP +#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_SUNOS_HPP + +#include +#include +#include + +namespace boost { +namespace alignment { + +inline void* +aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT +{ + BOOST_ASSERT(detail::is_alignment(alignment)); + return ::memalign(alignment, size); +} + +inline void +aligned_free(void* ptr) BOOST_NOEXCEPT +{ + ::free(ptr); +} + +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/alignment_of.hpp b/boost/align/detail/alignment_of.hpp new file mode 100644 index 00000000..b6fc3dcd --- /dev/null +++ b/boost/align/detail/alignment_of.hpp @@ -0,0 +1,31 @@ +/* +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_HPP +#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_HPP + +#include + +namespace boost { +namespace alignment { +namespace detail { + +template +struct offset_value { + char value; + T object; +}; + +template +struct alignment_of + : min_size) - sizeof(T)> { }; + +} /* detail */ +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/alignment_of_clang.hpp b/boost/align/detail/alignment_of_clang.hpp new file mode 100644 index 00000000..95773e5e --- /dev/null +++ b/boost/align/detail/alignment_of_clang.hpp @@ -0,0 +1,26 @@ +/* +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CLANG_HPP +#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CLANG_HPP + +#include +#include + +namespace boost { +namespace alignment { +namespace detail { + +template +struct alignment_of + : integral_constant { }; + +} /* detail */ +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/alignment_of_codegear.hpp b/boost/align/detail/alignment_of_codegear.hpp new file mode 100644 index 00000000..ea6f9042 --- /dev/null +++ b/boost/align/detail/alignment_of_codegear.hpp @@ -0,0 +1,26 @@ +/* +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CODEGEAR_HPP +#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CODEGEAR_HPP + +#include +#include + +namespace boost { +namespace alignment { +namespace detail { + +template +struct alignment_of + : integral_constant { }; + +} /* detail */ +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/alignment_of_cxx11.hpp b/boost/align/detail/alignment_of_cxx11.hpp new file mode 100644 index 00000000..05c74293 --- /dev/null +++ b/boost/align/detail/alignment_of_cxx11.hpp @@ -0,0 +1,23 @@ +/* +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CXX11_HPP +#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CXX11_HPP + +#include + +namespace boost { +namespace alignment { +namespace detail { + +using std::alignment_of; + +} /* detail */ +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/alignment_of_gcc.hpp b/boost/align/detail/alignment_of_gcc.hpp new file mode 100644 index 00000000..66a63a50 --- /dev/null +++ b/boost/align/detail/alignment_of_gcc.hpp @@ -0,0 +1,26 @@ +/* +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_GCC_HPP +#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_GCC_HPP + +#include +#include + +namespace boost { +namespace alignment { +namespace detail { + +template +struct alignment_of + : integral_constant { }; + +} /* detail */ +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/alignment_of_msvc.hpp b/boost/align/detail/alignment_of_msvc.hpp new file mode 100644 index 00000000..440b840d --- /dev/null +++ b/boost/align/detail/alignment_of_msvc.hpp @@ -0,0 +1,32 @@ +/* +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_MSVC_HPP +#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_MSVC_HPP + +#include + +namespace boost { +namespace alignment { +namespace detail { + +template +struct offset_value { + T first; + char value; + T second; +}; + +template +struct alignment_of + : min_size) - (sizeof(T) << 1)> { }; + +} /* detail */ +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/element_type.hpp b/boost/align/detail/element_type.hpp new file mode 100644 index 00000000..5b2b732d --- /dev/null +++ b/boost/align/detail/element_type.hpp @@ -0,0 +1,91 @@ +/* +Copyright 2015 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_ELEMENT_TYPE_HPP +#define BOOST_ALIGN_DETAIL_ELEMENT_TYPE_HPP + +#include + +#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) +#include +#else +#include +#endif + +namespace boost { +namespace alignment { +namespace detail { + +#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) +using std::remove_reference; +using std::remove_all_extents; +using std::remove_cv; +#else +template +struct remove_reference { + typedef T type; +}; + +template +struct remove_reference { + typedef T type; +}; + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +template +struct remove_reference { + typedef T type; +}; +#endif + +template +struct remove_all_extents { + typedef T type; +}; + +template +struct remove_all_extents { + typedef typename remove_all_extents::type type; +}; + +template +struct remove_all_extents { + typedef typename remove_all_extents::type type; +}; + +template +struct remove_cv { + typedef T type; +}; + +template +struct remove_cv { + typedef T type; +}; + +template +struct remove_cv { + typedef T type; +}; + +template +struct remove_cv { + typedef T type; +}; +#endif + +template +struct element_type { + typedef typename remove_cv::type>::type>::type type; +}; + +} /* detail */ +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/integral_constant.hpp b/boost/align/detail/integral_constant.hpp new file mode 100644 index 00000000..a1e0b467 --- /dev/null +++ b/boost/align/detail/integral_constant.hpp @@ -0,0 +1,53 @@ +/* +Copyright 2014-2016 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_INTEGRAL_CONSTANT_HPP +#define BOOST_ALIGN_DETAIL_INTEGRAL_CONSTANT_HPP + +#include + +#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) +#include +#endif + +namespace boost { +namespace alignment { +namespace detail { + +#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) +using std::integral_constant; +using std::true_type; +using std::false_type; +#else +template +struct integral_constant { + typedef T value_type; + typedef integral_constant type; + + BOOST_CONSTEXPR operator value_type() const BOOST_NOEXCEPT { + return Value; + } + + BOOST_CONSTEXPR value_type operator()() const BOOST_NOEXCEPT { + return Value; + } + + BOOST_STATIC_CONSTEXPR T value = Value; +}; + +template +BOOST_CONSTEXPR_OR_CONST T integral_constant::value; + +typedef integral_constant true_type; +typedef integral_constant false_type; +#endif + +} /* detail */ +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/is_alignment.hpp b/boost/align/detail/is_alignment.hpp new file mode 100644 index 00000000..542fbe46 --- /dev/null +++ b/boost/align/detail/is_alignment.hpp @@ -0,0 +1,28 @@ +/* +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP +#define BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP + +#include +#include + +namespace boost { +namespace alignment { +namespace detail { + +BOOST_CONSTEXPR inline bool +is_alignment(std::size_t value) BOOST_NOEXCEPT +{ + return (value > 0) && ((value & (value - 1)) == 0); +} + +} /* detail */ +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/align/detail/min_size.hpp b/boost/align/detail/min_size.hpp new file mode 100644 index 00000000..5b478fda --- /dev/null +++ b/boost/align/detail/min_size.hpp @@ -0,0 +1,26 @@ +/* +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_DETAIL_MIN_SIZE_HPP +#define BOOST_ALIGN_DETAIL_MIN_SIZE_HPP + +#include +#include + +namespace boost { +namespace alignment { +namespace detail { + +template +struct min_size + : integral_constant { }; + +} /* detail */ +} /* alignment */ +} /* boost */ + +#endif diff --git a/boost/archive/archive_exception.hpp b/boost/archive/archive_exception.hpp index fabcdb5f..dd9181c3 100644 --- a/boost/archive/archive_exception.hpp +++ b/boost/archive/archive_exception.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // archive/archive_exception.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -20,16 +20,16 @@ #include #include -#include +#include #include // note: the only reason this is in here is that windows header // includes #define exception_code _exception_code (arrrgghhhh!). // the most expedient way to address this is be sure that this // header is always included whenever this header file is included. -#if defined(BOOST_WINDOWS) -#include -#endif +#if defined(BOOST_WINDOWS) +#include +#endif #include // must be the last header @@ -39,7 +39,7 @@ namespace archive { ////////////////////////////////////////////////////////////////////// // exceptions thrown by archives // -class BOOST_SYMBOL_VISIBLE archive_exception : +class BOOST_SYMBOL_VISIBLE archive_exception : public virtual std::exception { private: @@ -52,7 +52,7 @@ protected: public: typedef enum { no_exception, // initialized without code - other_exception, // any excepton not listed below + other_exception, // any exception not listed below unregistered_class, // attempt to serialize a pointer of // an unregistered class invalid_signature, // first line of archive does not contain @@ -61,9 +61,9 @@ public: // subsequent to this one pointer_conflict, // an attempt has been made to directly // serialize an object which has - // already been serialized through a pointer. - // Were this permitted, the archive load would result - // in the creation of an extra copy of the obect. + // already been serialized through a pointer. + // Were this permitted, the archive load would result + // in the creation of an extra copy of the object. incompatible_native_format, // attempt to read native binary format // on incompatible platform array_size_too_short,// array being loaded doesn't fit in array allocated @@ -71,9 +71,9 @@ public: invalid_class_name, // class name greater than the maximum permitted. // most likely a corrupted archive or an attempt // to insert virus via buffer overrun method. - unregistered_cast, // base - derived relationship not registered with + unregistered_cast, // base - derived relationship not registered with // void_cast_register - unsupported_class_version, // type saved with a version # greater than the + unsupported_class_version, // type saved with a version # greater than the // one used by the program. This indicates that the program // needs to be rebuilt. multiple_code_instantiation, // code for implementing serialization for some @@ -83,13 +83,13 @@ public: exception_code code; BOOST_ARCHIVE_DECL archive_exception( - exception_code c, + exception_code c, const char * e1 = NULL, const char * e2 = NULL ) BOOST_NOEXCEPT; - BOOST_ARCHIVE_DECL archive_exception(archive_exception const &) BOOST_NOEXCEPT ; - virtual BOOST_ARCHIVE_DECL ~archive_exception() BOOST_NOEXCEPT_OR_NOTHROW ; - virtual BOOST_ARCHIVE_DECL const char * what() const BOOST_NOEXCEPT_OR_NOTHROW ; + BOOST_ARCHIVE_DECL archive_exception(archive_exception const &) BOOST_NOEXCEPT; + BOOST_ARCHIVE_DECL ~archive_exception() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE; + BOOST_ARCHIVE_DECL const char * what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE; }; }// namespace archive diff --git a/boost/archive/basic_archive.hpp b/boost/archive/basic_archive.hpp index 9283974f..381a1275 100644 --- a/boost/archive/basic_archive.hpp +++ b/boost/archive/basic_archive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_archive.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -18,9 +18,9 @@ #include // count #include #include -#include // size_t -#include #include +#include +#include #include #include // must be the last header @@ -33,76 +33,43 @@ namespace archive { #pragma warning( disable : 4244 4267 ) #endif -/* NOTE : Warning : Warning : Warning : Warning : Warning - * Don't ever changes this. If you do, they previously created - * binary archives won't be readable !!! - */ -class library_version_type { -private: - typedef uint_least16_t base_type; - base_type t; -public: - library_version_type(): t(0) {}; - explicit library_version_type(const unsigned int & t_) : t(t_){ - BOOST_ASSERT(t_ <= boost::integer_traits::const_max); - } - library_version_type(const library_version_type & t_) : - t(t_.t) - {} - library_version_type & operator=(const library_version_type & rhs){ - t = rhs.t; - return *this; - } - // used for text output - operator base_type () const { - return t; - } - // used for text input - operator base_type & (){ - return t; - } - bool operator==(const library_version_type & rhs) const { - return t == rhs.t; - } - bool operator<(const library_version_type & rhs) const { - return t < rhs.t; - } -}; - -BOOST_ARCHIVE_DECL library_version_type +BOOST_ARCHIVE_DECL boost::serialization::library_version_type BOOST_ARCHIVE_VERSION(); +// create alias in boost::archive for older user code. +typedef boost::serialization::library_version_type library_version_type; + class version_type { private: typedef uint_least32_t base_type; base_type t; public: // should be private - but MPI fails if it's not!!! - version_type(): t(0) {}; + version_type(): t(0) {} explicit version_type(const unsigned int & t_) : t(t_){ BOOST_ASSERT(t_ <= boost::integer_traits::const_max); } - version_type(const version_type & t_) : + version_type(const version_type & t_) : t(t_.t) {} version_type & operator=(const version_type & rhs){ - t = rhs.t; + t = rhs.t; return *this; } // used for text output operator base_type () const { return t; - } + } // used for text intput operator base_type & (){ return t; - } + } bool operator==(const version_type & rhs) const { return t == rhs.t; - } + } bool operator<(const version_type & rhs) const { return t < rhs.t; - } + } }; class class_id_type { @@ -111,73 +78,73 @@ private: base_type t; public: // should be private - but then can't use BOOST_STRONG_TYPE below - class_id_type() : t(0) {}; + class_id_type() : t(0) {} explicit class_id_type(const int t_) : t(t_){ BOOST_ASSERT(t_ <= boost::integer_traits::const_max); } explicit class_id_type(const std::size_t t_) : t(t_){ // BOOST_ASSERT(t_ <= boost::integer_traits::const_max); } - class_id_type(const class_id_type & t_) : + class_id_type(const class_id_type & t_) : t(t_.t) {} class_id_type & operator=(const class_id_type & rhs){ - t = rhs.t; + t = rhs.t; return *this; } // used for text output operator base_type () const { return t; - } + } // used for text input operator base_type &() { return t; - } + } bool operator==(const class_id_type & rhs) const { return t == rhs.t; - } + } bool operator<(const class_id_type & rhs) const { return t < rhs.t; - } + } }; -#define NULL_POINTER_TAG boost::archive::class_id_type(-1) +#define BOOST_SERIALIZATION_NULL_POINTER_TAG boost::archive::class_id_type(-1) class object_id_type { private: typedef uint_least32_t base_type; base_type t; public: - object_id_type(): t(0) {}; + object_id_type(): t(0) {} // note: presumes that size_t >= unsigned int. // use explicit cast to silence useless warning explicit object_id_type(const std::size_t & t_) : t(static_cast(t_)){ - // make quadriple sure that we haven't lost any real integer + // make quadruple sure that we haven't lost any real integer // precision BOOST_ASSERT(t_ <= boost::integer_traits::const_max); } - object_id_type(const object_id_type & t_) : + object_id_type(const object_id_type & t_) : t(t_.t) {} object_id_type & operator=(const object_id_type & rhs){ - t = rhs.t; + t = rhs.t; return *this; } // used for text output operator base_type () const { return t; - } + } // used for text input operator base_type & () { return t; - } + } bool operator==(const object_id_type & rhs) const { return t == rhs.t; - } + } bool operator<(const object_id_type & rhs) const { return t < rhs.t; - } + } }; #if defined(_MSC_VER) @@ -188,16 +155,16 @@ struct tracking_type { bool t; explicit tracking_type(const bool t_ = false) : t(t_) - {}; + {} tracking_type(const tracking_type & t_) : t(t_.t) {} operator bool () const { return t; - }; + } operator bool & () { return t; - }; + } tracking_type & operator=(const bool t_){ t = t_; return *this; @@ -214,8 +181,8 @@ struct tracking_type { } }; -struct class_name_type : - private boost::noncopyable +struct class_name_type : + private boost::noncopyable { char *t; operator const char * & () const { @@ -227,9 +194,9 @@ struct class_name_type : std::size_t size() const { return std::strlen(t); } - explicit class_name_type(const char *key_) + explicit class_name_type(const char *key_) : t(const_cast(key_)){} - explicit class_name_type(char *key_) + explicit class_name_type(char *key_) : t(key_){} class_name_type & operator=(const class_name_type & rhs){ t = rhs.t; @@ -249,7 +216,7 @@ BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_SIGNATURE(); /* NOTE : Warning : Warning : Warning : Warning : Warning - * If any of these are changed to different sized types, + * If any of these are changed to different sized types, * binary_iarchive won't be able to read older archives * unless you rev the library version and include conditional * code based on the library version. There is nothing @@ -279,7 +246,7 @@ BOOST_ARCHIVE_STRONG_TYPEDEF(object_id_type, object_reference_type) // set implementation level to primitive for all types // used internally by the serialization library -BOOST_CLASS_IMPLEMENTATION(boost::archive::library_version_type, primitive_type) +BOOST_CLASS_IMPLEMENTATION(boost::serialization::library_version_type, primitive_type) BOOST_CLASS_IMPLEMENTATION(boost::archive::version_type, primitive_type) BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_type, primitive_type) BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_reference_type, primitive_type) @@ -291,10 +258,10 @@ BOOST_CLASS_IMPLEMENTATION(boost::archive::tracking_type, primitive_type) #include -// set types used internally by the serialization library +// set types used internally by the serialization library // to be bitwise serializable -BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::library_version_type) +BOOST_IS_BITWISE_SERIALIZABLE(boost::serialization::library_version_type) BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::version_type) BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_type) BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_reference_type) diff --git a/boost/archive/basic_binary_iarchive.hpp b/boost/archive/basic_binary_iarchive.hpp index c85ead86..2ec90ce0 100644 --- a/boost/archive/basic_binary_iarchive.hpp +++ b/boost/archive/basic_binary_iarchive.hpp @@ -16,7 +16,7 @@ // IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE // ON PLATFORM APART FROM THE ONE THEY ARE CREATED ON -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -40,7 +41,7 @@ #include // must be the last header -namespace boost { +namespace boost { namespace archive { namespace detail { @@ -50,7 +51,7 @@ namespace detail { ///////////////////////////////////////////////////////////////////////// // class basic_binary_iarchive - read serialized objects from a input binary stream template -class BOOST_SYMBOL_VISIBLE basic_binary_iarchive : +class BOOST_SYMBOL_VISIBLE basic_binary_iarchive : public detail::common_iarchive { #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS @@ -66,7 +67,7 @@ protected: #endif #endif // intermediate level to support override of operators - // fot templates in the absence of partial function + // fot templates in the absence of partial function // template ordering. If we get here pass to base class // note extra nonsense to sneak it pass the borland compiers typedef detail::common_iarchive detail_common_iarchive; @@ -84,12 +85,12 @@ protected: BOOST_STATIC_ASSERT(sizeof(object_id_type) == sizeof(uint_least32_t)); BOOST_STATIC_ASSERT(sizeof(object_reference_type) == sizeof(uint_least32_t)); - // binary files don't include the optional information + // binary files don't include the optional information void load_override(class_id_optional_type & /* t */){} void load_override(tracking_type & t, int /*version*/){ - library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(6) < lvt){ + boost::serialization::library_version_type lv = this->get_library_version(); + if(boost::serialization::library_version_type(6) < lv){ int_least8_t x=0; * this->This() >> x; t = boost::archive::tracking_type(x); @@ -101,7 +102,7 @@ protected: } } void load_override(class_id_type & t){ - library_version_type lvt = this->get_library_version(); + boost::serialization::library_version_type lv = this->get_library_version(); /* * library versions: * boost 1.39 -> 5 @@ -117,10 +118,10 @@ protected: * - v > 6 : 16bit * - other : 32bit * --> which is obviously incorrect, see point 1 - * + * * the fix here decodes class_id_type on 16bit for all v <= 7, which seems to be the correct behaviour ... */ - if(boost::archive::library_version_type(7) < lvt){ + if(boost::serialization::library_version_type (7) < lv){ this->detail_common_iarchive::load_override(t); } else{ @@ -134,24 +135,24 @@ protected: } void load_override(version_type & t){ - library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(7) < lvt){ + boost::serialization::library_version_type lv = this->get_library_version(); + if(boost::serialization::library_version_type(7) < lv){ this->detail_common_iarchive::load_override(t); } else - if(boost::archive::library_version_type(6) < lvt){ + if(boost::serialization::library_version_type(6) < lv){ uint_least8_t x=0; * this->This() >> x; t = boost::archive::version_type(x); } else - if(boost::archive::library_version_type(5) < lvt){ + if(boost::serialization::library_version_type(5) < lv){ uint_least16_t x=0; * this->This() >> x; t = boost::archive::version_type(x); } else - if(boost::archive::library_version_type(2) < lvt){ + if(boost::serialization::library_version_type(2) < lv){ // upto 255 versions unsigned char x=0; * this->This() >> x; @@ -165,13 +166,13 @@ protected: } void load_override(boost::serialization::item_version_type & t){ - library_version_type lvt = this->get_library_version(); -// if(boost::archive::library_version_type(7) < lvt){ - if(boost::archive::library_version_type(6) < lvt){ + boost::serialization::library_version_type lv = this->get_library_version(); +// if(boost::serialization::library_version_type(7) < lvt){ + if(boost::serialization::library_version_type(6) < lv){ this->detail_common_iarchive::load_override(t); } else - if(boost::archive::library_version_type(6) < lvt){ + if(boost::serialization::library_version_type(6) < lv){ uint_least16_t x=0; * this->This() >> x; t = boost::serialization::item_version_type(x); @@ -184,21 +185,21 @@ protected: } void load_override(serialization::collection_size_type & t){ - if(boost::archive::library_version_type(5) < this->get_library_version()){ + if(boost::serialization::library_version_type(5) < this->get_library_version()){ this->detail_common_iarchive::load_override(t); } else{ unsigned int x=0; * this->This() >> x; t = serialization::collection_size_type(x); - } + } } BOOST_ARCHIVE_OR_WARCHIVE_DECL void load_override(class_name_type & t); BOOST_ARCHIVE_OR_WARCHIVE_DECL void init(); - + basic_binary_iarchive(unsigned int flags) : detail::common_iarchive(flags) {} diff --git a/boost/archive/basic_binary_iprimitive.hpp b/boost/archive/basic_binary_iprimitive.hpp index 665d3e81..a2902407 100644 --- a/boost/archive/basic_binary_iprimitive.hpp +++ b/boost/archive/basic_binary_iprimitive.hpp @@ -20,7 +20,7 @@ // IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE // ON PLATFORM APART FROM THE ONE THEY ARE CREATED ON -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -37,8 +37,8 @@ #include #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::memcpy; +namespace std{ + using ::memcpy; using ::size_t; } // namespace std #endif @@ -48,7 +48,6 @@ namespace std{ #include #include -//#include #include #include @@ -58,7 +57,7 @@ namespace std{ #include #include // must be the last header -namespace boost { +namespace boost { namespace archive { ///////////////////////////////////////////////////////////////////////////// @@ -98,8 +97,8 @@ public: ///////////////////////////////////////////////////////// // fundamental types that need special treatment - - // trap usage of invalid uninitialized boolean + + // trap usage of invalid uninitialized boolean void load(bool & t){ load_binary(& t, sizeof(t)); int i = t; @@ -119,29 +118,29 @@ public: BOOST_ARCHIVE_OR_WARCHIVE_DECL void init(); - BOOST_ARCHIVE_OR_WARCHIVE_DECL + BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_binary_iprimitive( - std::basic_streambuf & sb, + std::basic_streambuf & sb, bool no_codecvt ); - BOOST_ARCHIVE_OR_WARCHIVE_DECL + BOOST_ARCHIVE_OR_WARCHIVE_DECL ~basic_binary_iprimitive(); public: // we provide an optimized load for all fundamental types - // typedef serialization::is_bitwise_serializable + // typedef serialization::is_bitwise_serializable // use_array_optimization; - struct use_array_optimization { - template - #if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS) - struct apply { - typedef typename boost::serialization::is_bitwise_serializable< T >::type type; + struct use_array_optimization { + template + #if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS) + struct apply { + typedef typename boost::serialization::is_bitwise_serializable< T >::type type; }; #else - struct apply : public boost::serialization::is_bitwise_serializable< T > {}; + struct apply : public boost::serialization::is_bitwise_serializable< T > {}; #endif }; - // the optimized load_array dispatches to load_binary + // the optimized load_array dispatches to load_binary template void load_array(serialization::array_wrapper& a, unsigned int) { @@ -155,17 +154,17 @@ public: template inline void basic_binary_iprimitive::load_binary( - void *address, + void *address, std::size_t count ){ // note: an optimizer should eliminate the following for char files BOOST_ASSERT( - static_cast(count / sizeof(Elem)) + static_cast(count / sizeof(Elem)) <= boost::integer_traits::const_max ); std::streamsize s = static_cast(count / sizeof(Elem)); std::streamsize scount = m_sb.sgetn( - static_cast(address), + static_cast(address), s ); if(scount != s) diff --git a/boost/archive/basic_binary_oarchive.hpp b/boost/archive/basic_binary_oarchive.hpp index f05f2f86..61bd8faa 100644 --- a/boost/archive/basic_binary_oarchive.hpp +++ b/boost/archive/basic_binary_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_binary_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -58,7 +58,7 @@ namespace detail { // does have the virtue of buiding the smalles archive in the minimum amount // of time. So under some circumstances it may be he right choice. template -class BOOST_SYMBOL_VISIBLE basic_binary_oarchive : +class BOOST_SYMBOL_VISIBLE basic_binary_oarchive : public detail::common_oarchive { #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS @@ -90,18 +90,18 @@ protected: BOOST_STATIC_ASSERT(sizeof(object_id_type) == sizeof(uint_least32_t)); BOOST_STATIC_ASSERT(sizeof(object_reference_type) == sizeof(uint_least32_t)); - // binary files don't include the optional information + // binary files don't include the optional information void save_override(const class_id_optional_type & /* t */){} // enable this if we decide to support generation of previous versions #if 0 void save_override(const boost::archive::version_type & t){ library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(7) < lvt){ + if(boost::serialization::library_version_type(7) < lvt){ this->detail_common_oarchive::save_override(t); } else - if(boost::archive::library_version_type(6) < lvt){ + if(boost::serialization::library_version_type(6) < lvt){ const boost::uint_least16_t x = t; * this->This() << x; } @@ -112,11 +112,11 @@ protected: } void save_override(const boost::serialization::item_version_type & t){ library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(7) < lvt){ + if(boost::serialization::library_version_type(7) < lvt){ this->detail_common_oarchive::save_override(t); } else - if(boost::archive::library_version_type(6) < lvt){ + if(boost::serialization::library_version_type(6) < lvt){ const boost::uint_least16_t x = t; * this->This() << x; } @@ -128,11 +128,11 @@ protected: void save_override(class_id_type & t){ library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(7) < lvt){ + if(boost::serialization::library_version_type(7) < lvt){ this->detail_common_oarchive::save_override(t); } else - if(boost::archive::library_version_type(6) < lvt){ + if(boost::serialization::library_version_type(6) < lvt){ const boost::int_least16_t x = t; * this->This() << x; } @@ -155,11 +155,11 @@ protected: #if 0 void save_override(const serialization::collection_size_type & t){ - if (get_library_version() < boost::archive::library_version_type(6)){ + if (get_library_version() < boost::serialization::library_version_type(6)){ unsigned int x=0; * this->This() >> x; t = serialization::collection_size_type(x); - } + } else{ * this->This() >> t; } diff --git a/boost/archive/basic_binary_oprimitive.hpp b/boost/archive/basic_binary_oprimitive.hpp index 6dc770c6..6c5e8e5e 100644 --- a/boost/archive/basic_binary_oprimitive.hpp +++ b/boost/archive/basic_binary_oprimitive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_binary_oprimitive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -32,8 +32,8 @@ #include #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif @@ -43,7 +43,6 @@ namespace std{ #include #include -//#include #include #include @@ -93,7 +92,7 @@ public: ///////////////////////////////////////////////////////// // fundamental types that need special treatment - + // trap usage of invalid uninitialized boolean which would // otherwise crash on load. void save(const bool t){ @@ -113,32 +112,32 @@ public: BOOST_ARCHIVE_OR_WARCHIVE_DECL void init(); - - BOOST_ARCHIVE_OR_WARCHIVE_DECL + + BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_binary_oprimitive( - std::basic_streambuf & sb, + std::basic_streambuf & sb, bool no_codecvt ); - BOOST_ARCHIVE_OR_WARCHIVE_DECL + BOOST_ARCHIVE_OR_WARCHIVE_DECL ~basic_binary_oprimitive(); public: // we provide an optimized save for all fundamental types - // typedef serialization::is_bitwise_serializable + // typedef serialization::is_bitwise_serializable // use_array_optimization; // workaround without using mpl lambdas struct use_array_optimization { - template - #if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS) - struct apply { - typedef typename boost::serialization::is_bitwise_serializable< T >::type type; + template + #if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS) + struct apply { + typedef typename boost::serialization::is_bitwise_serializable< T >::type type; }; #else - struct apply : public boost::serialization::is_bitwise_serializable< T > {}; + struct apply : public boost::serialization::is_bitwise_serializable< T > {}; #endif }; - // the optimized save_array dispatches to save_binary + // the optimized save_array dispatches to save_binary template void save_array(boost::serialization::array_wrapper const& a, unsigned int) { @@ -149,9 +148,9 @@ public: }; template -inline void +inline void basic_binary_oprimitive::save_binary( - const void *address, + const void *address, std::size_t count ){ // BOOST_ASSERT(count <= std::size_t(boost::integer_traits::const_max)); @@ -166,7 +165,7 @@ basic_binary_oprimitive::save_binary( // figure number of elements to output - round up count = ( count + sizeof(Elem) - 1) / sizeof(Elem); std::streamsize scount = m_sb.sputn( - static_cast(address), + static_cast(address), static_cast(count) ); if(count != static_cast(scount)) @@ -174,14 +173,14 @@ basic_binary_oprimitive::save_binary( archive_exception(archive_exception::output_stream_error) ); //os.write( - // static_cast(address), + // static_cast(address), // count //); //BOOST_ASSERT(os.good()); } -} //namespace boost -} //namespace archive +} //namespace boost +} //namespace archive #include // pop pragmas diff --git a/boost/archive/basic_text_iarchive.hpp b/boost/archive/basic_text_iarchive.hpp index 48a646cc..d58540d8 100644 --- a/boost/archive/basic_text_iarchive.hpp +++ b/boost/archive/basic_text_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_text_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -46,7 +46,7 @@ namespace detail { ///////////////////////////////////////////////////////////////////////// // class basic_text_iarchive - read serialized objects from a input text stream template -class BOOST_SYMBOL_VISIBLE basic_text_iarchive : +class BOOST_SYMBOL_VISIBLE basic_text_iarchive : public detail::common_iarchive { #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS @@ -54,7 +54,7 @@ public: #else protected: #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) - // for some inexplicable reason insertion of "class" generates compile erro + // for some inexplicable reason insertion of "class" generates compile error // on msvc 7.1 friend detail::interface_iarchive; #else @@ -62,26 +62,26 @@ protected: #endif #endif // intermediate level to support override of operators - // fot templates in the absence of partial function + // fot templates in the absence of partial function // template ordering typedef detail::common_iarchive detail_common_iarchive; template void load_override(T & t){ this->detail_common_iarchive::load_override(t); } - // text file don't include the optional information + // text file don't include the optional information void load_override(class_id_optional_type & /*t*/){} BOOST_ARCHIVE_OR_WARCHIVE_DECL void load_override(class_name_type & t); BOOST_ARCHIVE_OR_WARCHIVE_DECL void - init(void); + init(); - basic_text_iarchive(unsigned int flags) : + basic_text_iarchive(unsigned int flags) : detail::common_iarchive(flags) {} - ~basic_text_iarchive(){} + ~basic_text_iarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/boost/archive/basic_text_iprimitive.hpp b/boost/archive/basic_text_iprimitive.hpp index bf936b55..606f59f5 100644 --- a/boost/archive/basic_text_iprimitive.hpp +++ b/boost/archive/basic_text_iprimitive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_text_iprimitive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -29,8 +29,8 @@ #include #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; #if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT) using ::locale; #endif @@ -121,9 +121,9 @@ protected: t = i; } #endif - BOOST_ARCHIVE_OR_WARCHIVE_DECL + BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_text_iprimitive(IStream &is, bool no_codecvt); - BOOST_ARCHIVE_OR_WARCHIVE_DECL + BOOST_ARCHIVE_OR_WARCHIVE_DECL ~basic_text_iprimitive(); public: BOOST_ARCHIVE_OR_WARCHIVE_DECL void diff --git a/boost/archive/basic_text_oarchive.hpp b/boost/archive/basic_text_oarchive.hpp index 6f7f8fb1..37ce33d7 100644 --- a/boost/archive/basic_text_oarchive.hpp +++ b/boost/archive/basic_text_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_text_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -44,9 +44,9 @@ namespace detail { } // namespace detail ///////////////////////////////////////////////////////////////////////// -// class basic_text_oarchive +// class basic_text_oarchive template -class BOOST_SYMBOL_VISIBLE basic_text_oarchive : +class BOOST_SYMBOL_VISIBLE basic_text_oarchive : public detail::common_oarchive { #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS @@ -89,7 +89,7 @@ protected: this->detail_common_oarchive::save_override(t); } - // text file don't include the optional information + // text file don't include the optional information void save_override(const class_id_optional_type & /* t */){} void save_override(const class_name_type & t){ @@ -104,7 +104,7 @@ protected: detail::common_oarchive(flags), delimiter(none) {} - ~basic_text_oarchive(){} + ~basic_text_oarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/boost/archive/basic_text_oprimitive.hpp b/boost/archive/basic_text_oprimitive.hpp index 45f09358..adc0e896 100644 --- a/boost/archive/basic_text_oprimitive.hpp +++ b/boost/archive/basic_text_oprimitive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_text_oprimitive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -38,7 +38,7 @@ #endif #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ +namespace std{ using ::size_t; #if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT) using ::locale; @@ -142,22 +142,23 @@ protected: template struct is_float { - typedef typename mpl::bool_< - boost::is_floating_point::value + typedef typename mpl::bool_< + boost::is_floating_point::value || (std::numeric_limits::is_specialized && !std::numeric_limits::is_integer && !std::numeric_limits::is_exact - && std::numeric_limits::max_exponent) + && std::numeric_limits::max_exponent) >::type type; }; template void save_impl(const T &t, boost::mpl::bool_ &){ // must be a user mistake - can't serialize un-initialized data - if(os.fail()) + if(os.fail()){ boost::serialization::throw_exception( archive_exception(archive_exception::output_stream_error) ); + } // The formulae for the number of decimla digits required is given in // http://www2.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1822.pdf // which is derived from Kahan's paper: @@ -181,7 +182,7 @@ protected: BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_text_oprimitive(OStream & os, bool no_codecvt); - BOOST_ARCHIVE_OR_WARCHIVE_DECL + BOOST_ARCHIVE_OR_WARCHIVE_DECL ~basic_text_oprimitive(); public: // unformatted append of one character @@ -197,12 +198,12 @@ public: while('\0' != *s) os.put(*s++); } - BOOST_ARCHIVE_OR_WARCHIVE_DECL void + BOOST_ARCHIVE_OR_WARCHIVE_DECL void save_binary(const void *address, std::size_t count); }; -} //namespace boost -} //namespace archive +} //namespace boost +} //namespace archive #include // pops abi_suffix.hpp pragmas diff --git a/boost/archive/basic_xml_archive.hpp b/boost/archive/basic_xml_archive.hpp index bef368b9..546610fa 100644 --- a/boost/archive/basic_xml_archive.hpp +++ b/boost/archive/basic_xml_archive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_xml_archive.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -21,40 +21,40 @@ #include #include // must be the last header -namespace boost { +namespace boost { namespace archive { // constant strings used in xml i/o -extern +extern BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_OBJECT_ID(); -extern +extern BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_OBJECT_REFERENCE(); -extern +extern BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_CLASS_ID(); -extern +extern BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_CLASS_ID_REFERENCE(); -extern +extern BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_CLASS_NAME(); -extern +extern BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_TRACKING(); -extern +extern BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_VERSION(); -extern +extern BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_SIGNATURE(); diff --git a/boost/archive/basic_xml_iarchive.hpp b/boost/archive/basic_xml_iarchive.hpp index e9f7482f..84c1532f 100644 --- a/boost/archive/basic_xml_iarchive.hpp +++ b/boost/archive/basic_xml_iarchive.hpp @@ -104,7 +104,7 @@ protected: BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_xml_iarchive(unsigned int flags); BOOST_ARCHIVE_OR_WARCHIVE_DECL - ~basic_xml_iarchive(); + ~basic_xml_iarchive() BOOST_OVERRIDE; }; } // namespace archive diff --git a/boost/archive/basic_xml_oarchive.hpp b/boost/archive/basic_xml_oarchive.hpp index 107fca4e..b2b19cad 100644 --- a/boost/archive/basic_xml_oarchive.hpp +++ b/boost/archive/basic_xml_oarchive.hpp @@ -123,7 +123,7 @@ protected: BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_xml_oarchive(unsigned int flags); BOOST_ARCHIVE_OR_WARCHIVE_DECL - ~basic_xml_oarchive(); + ~basic_xml_oarchive() BOOST_OVERRIDE; }; } // namespace archive diff --git a/boost/archive/binary_iarchive.hpp b/boost/archive/binary_iarchive.hpp index 785ce761..5052631a 100644 --- a/boost/archive/binary_iarchive.hpp +++ b/boost/archive/binary_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -33,8 +33,8 @@ namespace archive { // preserve correct static polymorphism. class BOOST_SYMBOL_VISIBLE binary_iarchive : public binary_iarchive_impl< - boost::archive::binary_iarchive, - std::istream::char_type, + boost::archive::binary_iarchive, + std::istream::char_type, std::istream::traits_type >{ public: @@ -42,12 +42,16 @@ public: binary_iarchive_impl< binary_iarchive, std::istream::char_type, std::istream::traits_type >(is, flags) - {} + { + init(flags); + } binary_iarchive(std::streambuf & bsb, unsigned int flags = 0) : binary_iarchive_impl< binary_iarchive, std::istream::char_type, std::istream::traits_type >(bsb, flags) - {} + { + init(flags); + } }; } // namespace archive diff --git a/boost/archive/binary_iarchive_impl.hpp b/boost/archive/binary_iarchive_impl.hpp index b4747c98..8e97ad12 100644 --- a/boost/archive/binary_iarchive_impl.hpp +++ b/boost/archive/binary_iarchive_impl.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_iarchive_impl.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -25,7 +25,7 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { namespace detail { @@ -33,7 +33,7 @@ namespace detail { } // namespace detail template -class BOOST_SYMBOL_VISIBLE binary_iarchive_impl : +class BOOST_SYMBOL_VISIBLE binary_iarchive_impl : public basic_binary_iprimitive, public basic_binary_iarchive { @@ -70,29 +70,25 @@ protected: #endif } binary_iarchive_impl( - std::basic_streambuf & bsb, + std::basic_streambuf & bsb, unsigned int flags ) : basic_binary_iprimitive( - bsb, + bsb, 0 != (flags & no_codecvt) ), basic_binary_iarchive(flags) - { - init(flags); - } + {} binary_iarchive_impl( - std::basic_istream & is, + std::basic_istream & is, unsigned int flags ) : basic_binary_iprimitive( - * is.rdbuf(), + * is.rdbuf(), 0 != (flags & no_codecvt) ), basic_binary_iarchive(flags) - { - init(flags); - } + {} }; } // namespace archive diff --git a/boost/archive/binary_oarchive.hpp b/boost/archive/binary_oarchive.hpp index e8313fd7..ba775d5c 100644 --- a/boost/archive/binary_oarchive.hpp +++ b/boost/archive/binary_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -26,13 +26,13 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { // do not derive from this class. If you want to extend this functionality // via inhertance, derived from binary_oarchive_impl instead. This will // preserve correct static polymorphism. -class BOOST_SYMBOL_VISIBLE binary_oarchive : +class BOOST_SYMBOL_VISIBLE binary_oarchive : public binary_oarchive_impl< binary_oarchive, std::ostream::char_type, std::ostream::traits_type > @@ -42,12 +42,16 @@ public: binary_oarchive_impl< binary_oarchive, std::ostream::char_type, std::ostream::traits_type >(os, flags) - {} + { + init(flags); + } binary_oarchive(std::streambuf & bsb, unsigned int flags = 0) : binary_oarchive_impl< binary_oarchive, std::ostream::char_type, std::ostream::traits_type >(bsb, flags) - {} + { + init(flags); + } }; } // namespace archive diff --git a/boost/archive/binary_oarchive_impl.hpp b/boost/archive/binary_oarchive_impl.hpp index 6b4d018a..d8387112 100644 --- a/boost/archive/binary_oarchive_impl.hpp +++ b/boost/archive/binary_oarchive_impl.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_oarchive_impl.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -26,7 +26,7 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { namespace detail { @@ -34,7 +34,7 @@ namespace detail { } // namespace detail template -class BOOST_SYMBOL_VISIBLE binary_oarchive_impl : +class BOOST_SYMBOL_VISIBLE binary_oarchive_impl : public basic_binary_oprimitive, public basic_binary_oarchive { @@ -71,29 +71,25 @@ protected: #endif } binary_oarchive_impl( - std::basic_streambuf & bsb, + std::basic_streambuf & bsb, unsigned int flags ) : basic_binary_oprimitive( - bsb, + bsb, 0 != (flags & no_codecvt) ), basic_binary_oarchive(flags) - { - init(flags); - } + {} binary_oarchive_impl( - std::basic_ostream & os, + std::basic_ostream & os, unsigned int flags ) : basic_binary_oprimitive( - * os.rdbuf(), + * os.rdbuf(), 0 != (flags & no_codecvt) ), basic_binary_oarchive(flags) - { - init(flags); - } + {} }; } // namespace archive diff --git a/boost/archive/binary_wiarchive.hpp b/boost/archive/binary_wiarchive.hpp index 775d8f82..45a2af56 100644 --- a/boost/archive/binary_wiarchive.hpp +++ b/boost/archive/binary_wiarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_wiarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -25,10 +25,10 @@ #include #include -namespace boost { +namespace boost { namespace archive { -class binary_wiarchive : +class binary_wiarchive : public binary_iarchive_impl< binary_wiarchive, std::wistream::char_type, std::wistream::traits_type > diff --git a/boost/archive/binary_woarchive.hpp b/boost/archive/binary_woarchive.hpp index a8817d6f..6735ceba 100644 --- a/boost/archive/binary_woarchive.hpp +++ b/boost/archive/binary_woarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_woarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -25,13 +25,13 @@ #include #include -namespace boost { +namespace boost { namespace archive { // do not derive from this class. If you want to extend this functionality // via inhertance, derived from binary_oarchive_impl instead. This will // preserve correct static polymorphism. -class binary_woarchive : +class binary_woarchive : public binary_oarchive_impl< binary_woarchive, std::wostream::char_type, std::wostream::traits_type > diff --git a/boost/archive/codecvt_null.hpp b/boost/archive/codecvt_null.hpp index 3b39c8ed..3905d43a 100644 --- a/boost/archive/codecvt_null.hpp +++ b/boost/archive/codecvt_null.hpp @@ -24,7 +24,7 @@ #include #include #include -#include // must be the last header +//#include // must be the last header #if defined(BOOST_NO_STDC_NAMESPACE) namespace std { @@ -52,21 +52,21 @@ class codecvt_null; template<> class codecvt_null : public std::codecvt { - virtual bool do_always_noconv() const throw() { + bool do_always_noconv() const throw() BOOST_OVERRIDE { return true; } public: explicit codecvt_null(std::size_t no_locale_manage = 0) : std::codecvt(no_locale_manage) {} - virtual ~codecvt_null(){}; + ~codecvt_null() BOOST_OVERRIDE {} }; template<> -class BOOST_WARCHIVE_DECL codecvt_null : +class BOOST_SYMBOL_VISIBLE codecvt_null : public std::codecvt { - virtual std::codecvt_base::result + BOOST_SYMBOL_EXPORT std::codecvt_base::result do_out( std::mbstate_t & state, const wchar_t * first1, @@ -75,8 +75,9 @@ class BOOST_WARCHIVE_DECL codecvt_null : char * first2, char * last2, char * & next2 - ) const; - virtual std::codecvt_base::result + ) const BOOST_OVERRIDE; + + BOOST_SYMBOL_EXPORT std::codecvt_base::result do_in( std::mbstate_t & state, const char * first1, @@ -85,18 +86,23 @@ class BOOST_WARCHIVE_DECL codecvt_null : wchar_t * first2, wchar_t * last2, wchar_t * & next2 - ) const; - virtual int do_encoding( ) const throw( ){ + ) const BOOST_OVERRIDE; + + BOOST_SYMBOL_EXPORT int do_encoding( ) const throw( ) BOOST_OVERRIDE { return sizeof(wchar_t) / sizeof(char); } - virtual int do_max_length( ) const throw( ){ + + BOOST_SYMBOL_EXPORT bool do_always_noconv() const throw() BOOST_OVERRIDE { + return false; + } + + BOOST_SYMBOL_EXPORT int do_max_length( ) const throw( ) BOOST_OVERRIDE { return do_encoding(); } public: - explicit codecvt_null(std::size_t no_locale_manage = 0) : - std::codecvt(no_locale_manage) - {} - //virtual ~codecvt_null(){}; + BOOST_SYMBOL_EXPORT explicit codecvt_null(std::size_t no_locale_manage = 0); + + BOOST_SYMBOL_EXPORT ~codecvt_null() BOOST_OVERRIDE ; }; } // namespace archive @@ -105,6 +111,6 @@ public: #ifdef BOOST_MSVC # pragma warning(pop) #endif -#include // pop pragmas +//#include // pop pragmas #endif //BOOST_ARCHIVE_CODECVT_NULL_HPP diff --git a/boost/archive/detail/abi_prefix.hpp b/boost/archive/detail/abi_prefix.hpp index debf79e9..b45253b5 100644 --- a/boost/archive/detail/abi_prefix.hpp +++ b/boost/archive/detail/abi_prefix.hpp @@ -1,7 +1,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // abi_prefix.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) diff --git a/boost/archive/detail/abi_suffix.hpp b/boost/archive/detail/abi_suffix.hpp index 4e054d66..f3307c92 100644 --- a/boost/archive/detail/abi_suffix.hpp +++ b/boost/archive/detail/abi_suffix.hpp @@ -1,7 +1,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // abi_suffix.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) diff --git a/boost/archive/detail/archive_serializer_map.hpp b/boost/archive/detail/archive_serializer_map.hpp index 5432bfc7..1e94e258 100644 --- a/boost/archive/detail/archive_serializer_map.hpp +++ b/boost/archive/detail/archive_serializer_map.hpp @@ -7,10 +7,10 @@ #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// archive_serializer_map.hpp: extenstion of type_info required for +// archive_serializer_map.hpp: extenstion of type_info required for // serialization. -// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -18,7 +18,7 @@ // See http://www.boost.org for updates, documentation, and revision history. // note: this is nothing more than the thinest of wrappers around -// basic_serializer_map so we can have a one map / archive type. +// basic_serializer_map so we can have a one map / archive type. #include #include diff --git a/boost/archive/detail/auto_link_archive.hpp b/boost/archive/detail/auto_link_archive.hpp index 79b0e490..fefd3ab2 100644 --- a/boost/archive/detail/auto_link_archive.hpp +++ b/boost/archive/detail/auto_link_archive.hpp @@ -16,12 +16,12 @@ // See library home page at http://www.boost.org/libs/serialization -//----------------------------------------------------------------------------// +//----------------------------------------------------------------------------// // This header implements separate compilation features as described in // http://www.boost.org/more/separate_compilation.html -// enable automatic library variant selection ------------------------------// +// enable automatic library variant selection ------------------------------// #include diff --git a/boost/archive/detail/auto_link_warchive.hpp b/boost/archive/detail/auto_link_warchive.hpp index 683d191c..4f506864 100644 --- a/boost/archive/detail/auto_link_warchive.hpp +++ b/boost/archive/detail/auto_link_warchive.hpp @@ -16,12 +16,12 @@ // See library home page at http://www.boost.org/libs/serialization -//----------------------------------------------------------------------------// +//----------------------------------------------------------------------------// // This header implements separate compilation features as described in // http://www.boost.org/more/separate_compilation.html -// enable automatic library variant selection ------------------------------// +// enable automatic library variant selection ------------------------------// #include diff --git a/boost/archive/detail/basic_iarchive.hpp b/boost/archive/detail/basic_iarchive.hpp index 1f5a8bf6..a3eb9342 100644 --- a/boost/archive/detail/basic_iarchive.hpp +++ b/boost/archive/detail/basic_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_iarchive.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -72,27 +72,27 @@ public: const basic_iserializer & bis ); BOOST_ARCHIVE_DECL void load_object( - void *t, + void *t, const basic_iserializer & bis ); - BOOST_ARCHIVE_DECL const basic_pointer_iserializer * + BOOST_ARCHIVE_DECL const basic_pointer_iserializer * load_pointer( - void * & t, + void * & t, const basic_pointer_iserializer * bpis_ptr, const basic_pointer_iserializer * (*finder)( const boost::serialization::extended_type_info & eti ) ); // real public API starts here - BOOST_ARCHIVE_DECL void - set_library_version(library_version_type archive_library_version); - BOOST_ARCHIVE_DECL library_version_type + BOOST_ARCHIVE_DECL void + set_library_version(boost::serialization::library_version_type archive_library_version); + BOOST_ARCHIVE_DECL boost::serialization::library_version_type get_library_version() const; BOOST_ARCHIVE_DECL unsigned int get_flags() const; - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void reset_object_address(const void * new_address, const void * old_address); - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void delete_created_pointers(); }; diff --git a/boost/archive/detail/basic_iserializer.hpp b/boost/archive/detail/basic_iserializer.hpp index 0d66674c..98c9c474 100644 --- a/boost/archive/detail/basic_iserializer.hpp +++ b/boost/archive/detail/basic_iserializer.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_iserializer.hpp: extenstion of type_info required for serialization. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -42,7 +42,7 @@ namespace detail { class basic_iarchive; class basic_pointer_iserializer; -class BOOST_SYMBOL_VISIBLE basic_iserializer : +class BOOST_SYMBOL_VISIBLE basic_iserializer : public basic_serializer { private: @@ -63,7 +63,7 @@ public: return m_bpis; } virtual void load_object_data( - basic_iarchive & ar, + basic_iarchive & ar, void *x, const unsigned int file_version ) const = 0; diff --git a/boost/archive/detail/basic_oarchive.hpp b/boost/archive/detail/basic_oarchive.hpp index c379108d..36e80d10 100644 --- a/boost/archive/detail/basic_oarchive.hpp +++ b/boost/archive/detail/basic_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_oarchive.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -69,19 +69,19 @@ public: const basic_oserializer & bos ); BOOST_ARCHIVE_DECL void save_object( - const void *x, + const void *x, const basic_oserializer & bos ); BOOST_ARCHIVE_DECL void save_pointer( - const void * t, + const void * t, const basic_pointer_oserializer * bpos_ptr ); void save_null_pointer(){ - vsave(NULL_POINTER_TAG); + vsave(BOOST_SERIALIZATION_NULL_POINTER_TAG); } // real public interface starts here BOOST_ARCHIVE_DECL void end_preamble(); // default implementation does nothing - BOOST_ARCHIVE_DECL library_version_type get_library_version() const; + BOOST_ARCHIVE_DECL boost::serialization::library_version_type get_library_version() const; BOOST_ARCHIVE_DECL unsigned int get_flags() const; }; diff --git a/boost/archive/detail/basic_oserializer.hpp b/boost/archive/detail/basic_oserializer.hpp index 94247e90..b3f95677 100644 --- a/boost/archive/detail/basic_oserializer.hpp +++ b/boost/archive/detail/basic_oserializer.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_oserializer.hpp: extenstion of type_info required for serialization. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) diff --git a/boost/archive/detail/basic_pointer_iserializer.hpp b/boost/archive/detail/basic_pointer_iserializer.hpp index 1fc4b14d..be805a42 100644 --- a/boost/archive/detail/basic_pointer_iserializer.hpp +++ b/boost/archive/detail/basic_pointer_iserializer.hpp @@ -7,10 +7,10 @@ #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_pointer_oserializer.hpp: extenstion of type_info required for +// basic_pointer_oserializer.hpp: extenstion of type_info required for // serialization. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -51,7 +51,7 @@ public: virtual void * heap_allocation() const = 0; virtual const basic_iserializer & get_basic_serializer() const = 0; virtual void load_object_ptr( - basic_iarchive & ar, + basic_iarchive & ar, void * x, const unsigned int file_version ) const = 0; diff --git a/boost/archive/detail/basic_pointer_oserializer.hpp b/boost/archive/detail/basic_pointer_oserializer.hpp index 1a5d9549..86376568 100644 --- a/boost/archive/detail/basic_pointer_oserializer.hpp +++ b/boost/archive/detail/basic_pointer_oserializer.hpp @@ -7,10 +7,10 @@ #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_pointer_oserializer.hpp: extenstion of type_info required for +// basic_pointer_oserializer.hpp: extenstion of type_info required for // serialization. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -39,7 +39,7 @@ namespace detail { class basic_oarchive; class basic_oserializer; -class BOOST_SYMBOL_VISIBLE basic_pointer_oserializer : +class BOOST_SYMBOL_VISIBLE basic_pointer_oserializer : public basic_serializer { protected: diff --git a/boost/archive/detail/basic_serializer.hpp b/boost/archive/detail/basic_serializer.hpp index f9c4203f..9c2535bf 100644 --- a/boost/archive/detail/basic_serializer.hpp +++ b/boost/archive/detail/basic_serializer.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_serializer.hpp: extenstion of type_info required for serialization. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -32,18 +32,18 @@ namespace boost { namespace archive { namespace detail { -class basic_serializer : +class basic_serializer : private boost::noncopyable { const boost::serialization::extended_type_info * m_eti; protected: explicit basic_serializer( const boost::serialization::extended_type_info & eti - ) : + ) : m_eti(& eti) {} public: - inline bool + inline bool operator<(const basic_serializer & rhs) const { // can't compare address since there can be multiple eti records // for the same type in different execution modules (that is, DLLS) diff --git a/boost/archive/detail/basic_serializer_map.hpp b/boost/archive/detail/basic_serializer_map.hpp index 79341803..78c6a52d 100644 --- a/boost/archive/detail/basic_serializer_map.hpp +++ b/boost/archive/detail/basic_serializer_map.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_serializer_map.hpp: extenstion of type_info required for serialization. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -24,7 +24,7 @@ #include // must be the last header -namespace boost { +namespace boost { namespace serialization { class extended_type_info; } @@ -45,7 +45,7 @@ basic_serializer_map : public ) const ; }; typedef std::set< - const basic_serializer *, + const basic_serializer *, type_info_pointer_compare > map_type; map_type m_map; diff --git a/boost/archive/detail/check.hpp b/boost/archive/detail/check.hpp index 10034e7d..5bf0a48b 100644 --- a/boost/archive/detail/check.hpp +++ b/boost/archive/detail/check.hpp @@ -4,18 +4,20 @@ // MS compatible compilers support #pragma once #if defined(_MSC_VER) # pragma once -#pragma inline_depth(511) +#if !defined(__clang__) +#pragma inline_depth(255) #pragma inline_recursion(on) #endif +#endif #if defined(__MWERKS__) -#pragma inline_depth(511) +#pragma inline_depth(255) #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // check.hpp: interface for serialization system. -// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -49,7 +51,7 @@ namespace detail { template inline void check_object_level(){ - typedef + typedef typename mpl::greater_equal< serialization::implementation_level< T >, mpl::int_ @@ -62,7 +64,7 @@ inline void check_object_level(){ template inline void check_object_versioning(){ - typedef + typedef typename mpl::or_< typename mpl::greater< serialization::implementation_level< T >, @@ -90,8 +92,8 @@ inline void check_object_tracking(){ // saving an non-const object of a type not marked "track_never) // may be an indicator of an error usage of the - // serialization library and should be double checked. - // See documentation on object tracking. Also, see the + // serialization library and should be double checked. + // See documentation on object tracking. Also, see the // "rationale" section of the documenation // for motivation for this checking. @@ -104,7 +106,7 @@ template inline void check_pointer_level(){ // we should only invoke this once we KNOW that T // has been used as a pointer!! - typedef + typedef typename mpl::or_< typename mpl::greater< serialization::implementation_level< T >, @@ -126,12 +128,12 @@ inline void check_pointer_level(){ // in this case, indication that an object is tracked is // not stored in the archive itself - see level == object_serializable - // but rather the existence of the operation ar >> T * is used to + // but rather the existence of the operation ar >> T * is used to // infer that an object of this type should be tracked. So, if // you save via a pointer but don't load via a pointer the operation // will fail on load without given any valid reason for the failure. - // So if your program traps here, consider changing the + // So if your program traps here, consider changing the // tracking or implementation level traits - or not // serializing via a pointer. BOOST_STATIC_WARNING(typex::value); diff --git a/boost/archive/detail/common_iarchive.hpp b/boost/archive/detail/common_iarchive.hpp index 4176a8a5..2935e310 100644 --- a/boost/archive/detail/common_iarchive.hpp +++ b/boost/archive/detail/common_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // common_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -42,22 +42,22 @@ class BOOST_SYMBOL_VISIBLE common_iarchive : friend class interface_iarchive; friend class basic_iarchive; private: - virtual void vload(version_type & t){ - * this->This() >> t; - } - virtual void vload(object_id_type & t){ + void vload(version_type & t) BOOST_OVERRIDE { * this->This() >> t; } - virtual void vload(class_id_type & t){ + void vload(object_id_type & t) BOOST_OVERRIDE { * this->This() >> t; } - virtual void vload(class_id_optional_type & t){ + void vload(class_id_type & t) BOOST_OVERRIDE { * this->This() >> t; } - virtual void vload(tracking_type & t){ + void vload(class_id_optional_type & t) BOOST_OVERRIDE { * this->This() >> t; } - virtual void vload(class_name_type &s){ + void vload(tracking_type & t) BOOST_OVERRIDE { + * this->This() >> t; + } + void vload(class_name_type &s) BOOST_OVERRIDE { * this->This() >> s; } protected: @@ -71,7 +71,7 @@ protected: void load_start(const char * /*name*/){} void load_end(const char * /*name*/){} // default archive initialization - common_iarchive(unsigned int flags = 0) : + common_iarchive(unsigned int flags = 0) : basic_iarchive(flags), interface_iarchive() {} @@ -86,4 +86,3 @@ protected: #endif #endif // BOOST_ARCHIVE_DETAIL_COMMON_IARCHIVE_HPP - diff --git a/boost/archive/detail/common_oarchive.hpp b/boost/archive/detail/common_oarchive.hpp index f7428637..fde60660 100644 --- a/boost/archive/detail/common_oarchive.hpp +++ b/boost/archive/detail/common_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // common_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -40,28 +40,28 @@ class BOOST_SYMBOL_VISIBLE common_oarchive : friend class interface_oarchive; friend class basic_oarchive; private: - virtual void vsave(const version_type t){ + void vsave(const version_type t) BOOST_OVERRIDE { * this->This() << t; } - virtual void vsave(const object_id_type t){ + void vsave(const object_id_type t) BOOST_OVERRIDE { * this->This() << t; } - virtual void vsave(const object_reference_type t){ + void vsave(const object_reference_type t) BOOST_OVERRIDE { * this->This() << t; } - virtual void vsave(const class_id_type t){ + void vsave(const class_id_type t) BOOST_OVERRIDE { * this->This() << t; } - virtual void vsave(const class_id_reference_type t){ + void vsave(const class_id_reference_type t) BOOST_OVERRIDE { * this->This() << t; } - virtual void vsave(const class_id_optional_type t){ + void vsave(const class_id_optional_type t) BOOST_OVERRIDE { * this->This() << t; } - virtual void vsave(const class_name_type & t){ + void vsave(const class_name_type & t) BOOST_OVERRIDE { * this->This() << t; } - virtual void vsave(const tracking_type t){ + void vsave(const tracking_type t) BOOST_OVERRIDE { * this->This() << t; } protected: @@ -72,7 +72,7 @@ protected: } void save_start(const char * /*name*/){} void save_end(const char * /*name*/){} - common_oarchive(unsigned int flags = 0) : + common_oarchive(unsigned int flags = 0) : basic_oarchive(flags), interface_oarchive() {} diff --git a/boost/archive/detail/decl.hpp b/boost/archive/detail/decl.hpp index 4f731cde..70555c31 100644 --- a/boost/archive/detail/decl.hpp +++ b/boost/archive/detail/decl.hpp @@ -1,10 +1,10 @@ #ifndef BOOST_ARCHIVE_DETAIL_DECL_HPP -#define BOOST_ARCHIVE_DETAIL_DECL_HPP +#define BOOST_ARCHIVE_DETAIL_DECL_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) # pragma once -#endif +#endif /////////1/////////2///////// 3/////////4/////////5/////////6/////////7/////////8 // decl.hpp @@ -16,7 +16,7 @@ // See library home page at http://www.boost.org/libs/serialization -//----------------------------------------------------------------------------// +//----------------------------------------------------------------------------// // This header implements separate compilation features as described in // http://www.boost.org/more/separate_compilation.html diff --git a/boost/archive/detail/interface_iarchive.hpp b/boost/archive/detail/interface_iarchive.hpp index 4a99e28b..5024a4d4 100644 --- a/boost/archive/detail/interface_iarchive.hpp +++ b/boost/archive/detail/interface_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // interface_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -31,10 +31,10 @@ namespace detail { class basic_pointer_iserializer; template -class interface_iarchive +class interface_iarchive { protected: - interface_iarchive(){}; + interface_iarchive() {} public: ///////////////////////////////////////////////////////// // archive public interface @@ -47,11 +47,11 @@ public: } template - const basic_pointer_iserializer * + const basic_pointer_iserializer * register_type(T * = NULL){ const basic_pointer_iserializer & bpis = boost::serialization::singleton< - pointer_iserializer + pointer_iserializer >::get_const_instance(); this->This()->register_basic_serializer(bpis.get_basic_serializer()); return & bpis; @@ -62,14 +62,14 @@ public: helper_collection & hc = this->This()->get_helper_collection(); return hc.template find_helper(id); } - + template Archive & operator>>(T & t){ this->This()->load_override(t); return * this->This(); } - // the & operator + // the & operator template Archive & operator&(T & t){ return *(this->This()) >> t; diff --git a/boost/archive/detail/interface_oarchive.hpp b/boost/archive/detail/interface_oarchive.hpp index 359463ed..44b47e61 100644 --- a/boost/archive/detail/interface_oarchive.hpp +++ b/boost/archive/detail/interface_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // interface_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -32,10 +32,10 @@ namespace detail { class basic_pointer_oserializer; template -class interface_oarchive +class interface_oarchive { protected: - interface_oarchive(){}; + interface_oarchive() {} public: ///////////////////////////////////////////////////////// // archive public interface @@ -48,7 +48,7 @@ public: } template - const basic_pointer_oserializer * + const basic_pointer_oserializer * register_type(const T * = NULL){ const basic_pointer_oserializer & bpos = boost::serialization::singleton< @@ -57,7 +57,7 @@ public: this->This()->register_basic_serializer(bpos.get_basic_serializer()); return & bpos; } - + template Helper & get_helper(void * const id = 0){ @@ -70,8 +70,8 @@ public: this->This()->save_override(t); return * this->This(); } - - // the & operator + + // the & operator template Archive & operator&(const T & t){ return * this ->This() << t; diff --git a/boost/archive/detail/iserializer.hpp b/boost/archive/detail/iserializer.hpp index 98cd6a17..b1a9d438 100644 --- a/boost/archive/detail/iserializer.hpp +++ b/boost/archive/detail/iserializer.hpp @@ -2,20 +2,22 @@ #define BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) +#if defined(BOOST_MSVC) # pragma once -#pragma inline_depth(511) +#if !defined(__clang__) +#pragma inline_depth(255) #pragma inline_recursion(on) #endif +#endif #if defined(__MWERKS__) -#pragma inline_depth(511) +#pragma inline_depth(255) #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // iserializer.hpp: interface for serialization system. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -28,8 +30,8 @@ #include #include #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif @@ -41,8 +43,8 @@ namespace std{ #include #include -#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO - #include +#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO + #include #endif #include #include @@ -60,12 +62,12 @@ namespace std{ #if !defined(BOOST_MSVC) && \ (BOOST_WORKAROUND(__IBMCPP__, < 1210) || \ defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590)) - #define DONT_USE_HAS_NEW_OPERATOR 1 + #define BOOST_SERIALIZATION_DONT_USE_HAS_NEW_OPERATOR 1 #else - #define DONT_USE_HAS_NEW_OPERATOR 0 + #define BOOST_SERIALIZATION_DONT_USE_HAS_NEW_OPERATOR 0 #endif -#if ! DONT_USE_HAS_NEW_OPERATOR +#if ! BOOST_SERIALIZATION_DONT_USE_HAS_NEW_OPERATOR #include #endif @@ -120,41 +122,41 @@ template class iserializer : public basic_iserializer { private: - virtual void destroy(/*const*/ void *address) const { + void destroy(/*const*/ void *address) const BOOST_OVERRIDE { boost::serialization::access::destroy(static_cast(address)); } public: explicit iserializer() : basic_iserializer( boost::serialization::singleton< - typename + typename boost::serialization::type_info_implementation< T >::type >::get_const_instance() ) {} - virtual BOOST_DLLEXPORT void load_object_data( + BOOST_DLLEXPORT void load_object_data( basic_iarchive & ar, - void *x, + void *x, const unsigned int file_version - ) const BOOST_USED; - virtual bool class_info() const { - return boost::serialization::implementation_level< T >::value + ) const BOOST_OVERRIDE BOOST_USED; + bool class_info() const BOOST_OVERRIDE { + return boost::serialization::implementation_level< T >::value >= boost::serialization::object_class_info; } - virtual bool tracking(const unsigned int /* flags */) const { - return boost::serialization::tracking_level< T >::value + bool tracking(const unsigned int /* flags */) const BOOST_OVERRIDE { + return boost::serialization::tracking_level< T >::value == boost::serialization::track_always - || ( boost::serialization::tracking_level< T >::value + || ( boost::serialization::tracking_level< T >::value == boost::serialization::track_selectively && serialized_as_pointer()); } - virtual version_type version() const { + version_type version() const BOOST_OVERRIDE { return version_type(::boost::serialization::version< T >::value); } - virtual bool is_polymorphic() const { + bool is_polymorphic() const BOOST_OVERRIDE { return boost::is_polymorphic< T >::value; } - virtual ~iserializer(){}; + ~iserializer() BOOST_OVERRIDE {} }; #ifdef BOOST_MSVC @@ -164,12 +166,12 @@ public: template BOOST_DLLEXPORT void iserializer::load_object_data( basic_iarchive & ar, - void *x, + void *x, const unsigned int file_version ) const { // note: we now comment this out. Before we permited archive // version # to be very large. Now we don't. To permit - // readers of these old archives, we have to suppress this + // readers of these old archives, we have to suppress this // code. Perhaps in the future we might re-enable it but // permit its suppression with a runtime switch. #if 0 @@ -186,7 +188,7 @@ BOOST_DLLEXPORT void iserializer::load_object_data( // be specialized by the user. boost::serialization::serialize_adl( boost::serialization::smart_cast_reference(ar), - * static_cast(x), + * static_cast(x), file_version ); } @@ -199,7 +201,7 @@ BOOST_DLLEXPORT void iserializer::load_object_data( // the purpose of this code is to allocate memory for an object // without requiring the constructor to be called. Presumably // the allocated object will be subsequently initialized with -// "placement new". +// "placement new". // note: we have the boost type trait has_new_operator but we // have no corresponding has_delete_operator. So we presume // that the former being true would imply that the a delete @@ -208,7 +210,7 @@ BOOST_DLLEXPORT void iserializer::load_object_data( template struct heap_allocation { // boost::has_new_operator< T > doesn't work on these compilers - #if DONT_USE_HAS_NEW_OPERATOR + #if BOOST_SERIALIZATION_DONT_USE_HAS_NEW_OPERATOR // This doesn't handle operator new overload for class T static T * invoke_new(){ return static_cast(operator new(sizeof(T))); @@ -250,7 +252,7 @@ struct heap_allocation { mpl::eval_if< boost::has_new_operator< T >, mpl::identity, - mpl::identity + mpl::identity >::type typex; return typex::invoke_new(); } @@ -259,7 +261,7 @@ struct heap_allocation { mpl::eval_if< boost::has_new_operator< T >, mpl::identity, - mpl::identity + mpl::identity >::type typex; typex::invoke_delete(t); } @@ -289,26 +291,26 @@ class pointer_iserializer : public basic_pointer_iserializer { private: - virtual void * heap_allocation() const { + void * heap_allocation() const BOOST_OVERRIDE { detail::heap_allocation h; T * t = h.get(); h.release(); return t; } - virtual const basic_iserializer & get_basic_serializer() const { + const basic_iserializer & get_basic_serializer() const BOOST_OVERRIDE { return boost::serialization::singleton< iserializer >::get_const_instance(); } - BOOST_DLLEXPORT virtual void load_object_ptr( - basic_iarchive & ar, + BOOST_DLLEXPORT void load_object_ptr( + basic_iarchive & ar, void * x, const unsigned int file_version - ) const BOOST_USED; + ) const BOOST_OVERRIDE BOOST_USED; public: // this should alway be a singleton so make the constructor protected pointer_iserializer(); - ~pointer_iserializer(); + ~pointer_iserializer() BOOST_OVERRIDE; }; #ifdef BOOST_MSVC @@ -319,12 +321,12 @@ public: // serialized only through base class won't get optimized out template BOOST_DLLEXPORT void pointer_iserializer::load_object_ptr( - basic_iarchive & ar, + basic_iarchive & ar, void * t, const unsigned int file_version ) const { - Archive & ar_impl = + Archive & ar_impl = boost::serialization::smart_cast_reference(ar); // note that the above will throw std::bad_alloc if the allocation @@ -334,7 +336,7 @@ BOOST_DLLEXPORT void pointer_iserializer::load_object_ptr( // automatically delete the t which is most likely not fully // constructed BOOST_TRY { - // this addresses an obscure situation that occurs when + // this addresses an obscure situation that occurs when // load_constructor de-serializes something through a pointer. ar.next_object_pointer(t); boost::serialization::load_construct_data_adl( @@ -358,7 +360,7 @@ template pointer_iserializer::pointer_iserializer() : basic_pointer_iserializer( boost::serialization::singleton< - typename + typename boost::serialization::type_info_implementation< T >::type >::get_const_instance() ) @@ -393,8 +395,8 @@ struct load_non_pointer_type { // make sure call is routed through the higest interface that might // be specialized by the user. boost::serialization::serialize_adl( - ar, - const_cast(t), + ar, + const_cast(t), boost::serialization::version< T >::value ); } @@ -407,7 +409,7 @@ struct load_non_pointer_type { static void invoke(Archive &ar, const T & t){ void * x = boost::addressof(const_cast(t)); ar.load_object( - x, + x, boost::serialization::singleton< iserializer >::get_const_instance() @@ -484,7 +486,7 @@ struct load_pointer_type { template static const basic_pointer_iserializer * register_type(Archive &ar, const T* const /*t*/){ - // there should never be any need to load an abstract polymorphic + // there should never be any need to load an abstract polymorphic // class pointer. Inhibiting code generation for this // permits abstract base classes to be used - note: exception // virtual serialize functions used for plug-ins @@ -492,7 +494,7 @@ struct load_pointer_type { mpl::eval_if< boost::serialization::is_abstract, boost::mpl::identity, - boost::mpl::identity + boost::mpl::identity >::type typex; return typex::template register_type< T >(ar); } @@ -508,7 +510,7 @@ struct load_pointer_type { boost::serialization::void_upcast( eti, boost::serialization::singleton< - typename + typename boost::serialization::type_info_implementation< T >::type >::get_const_instance(), t @@ -570,13 +572,13 @@ struct load_array_type { template static void invoke(Archive &ar, T &t){ typedef typename remove_extent< T >::type value_type; - + // convert integers to correct enum to load // determine number of elements in the array. Consider the - // fact that some machines will align elements on boundries + // fact that some machines will align elements on boundaries // other than characters. std::size_t current_count = sizeof(t) / ( - static_cast(static_cast(&t[1])) + static_cast(static_cast(&t[1])) - static_cast(static_cast(&t[0])) ); boost::serialization::collection_size_type count; diff --git a/boost/archive/detail/oserializer.hpp b/boost/archive/detail/oserializer.hpp index 612e1f2c..f6a77edf 100644 --- a/boost/archive/detail/oserializer.hpp +++ b/boost/archive/detail/oserializer.hpp @@ -4,18 +4,20 @@ // MS compatible compilers support #pragma once #if defined(_MSC_VER) # pragma once -#pragma inline_depth(511) +#if !defined(__clang__) +#pragma inline_depth(255) #pragma inline_recursion(on) #endif +#endif #if defined(__MWERKS__) -#pragma inline_depth(511) +#pragma inline_depth(255) #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // oserializer.hpp: interface for serialization system. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -36,8 +38,8 @@ #include #include -#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO - #include +#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO + #include #endif #include #include @@ -105,37 +107,37 @@ template class oserializer : public basic_oserializer { private: - // private constructor to inhibit any existence other than the + // private constructor to inhibit any existence other than the // static one public: explicit BOOST_DLLEXPORT oserializer() : basic_oserializer( boost::serialization::singleton< - typename + typename boost::serialization::type_info_implementation< T >::type >::get_const_instance() ) {} - virtual BOOST_DLLEXPORT void save_object_data( - basic_oarchive & ar, + BOOST_DLLEXPORT void save_object_data( + basic_oarchive & ar, const void *x - ) const BOOST_USED; - virtual bool class_info() const { - return boost::serialization::implementation_level< T >::value + ) const BOOST_OVERRIDE BOOST_USED; + bool class_info() const BOOST_OVERRIDE { + return boost::serialization::implementation_level< T >::value >= boost::serialization::object_class_info; } - virtual bool tracking(const unsigned int /* flags */) const { + bool tracking(const unsigned int /* flags */) const BOOST_OVERRIDE { return boost::serialization::tracking_level< T >::value == boost::serialization::track_always || (boost::serialization::tracking_level< T >::value == boost::serialization::track_selectively && serialized_as_pointer()); } - virtual version_type version() const { + version_type version() const BOOST_OVERRIDE { return version_type(::boost::serialization::version< T >::value); } - virtual bool is_polymorphic() const { + bool is_polymorphic() const BOOST_OVERRIDE { return boost::is_polymorphic< T >::value; } - virtual ~oserializer(){} + ~oserializer() BOOST_OVERRIDE {} }; #ifdef BOOST_MSVC @@ -144,7 +146,7 @@ public: template BOOST_DLLEXPORT void oserializer::save_object_data( - basic_oarchive & ar, + basic_oarchive & ar, const void *x ) const { // make sure call is routed through the highest interface that might @@ -167,19 +169,19 @@ class pointer_oserializer : public basic_pointer_oserializer { private: - const basic_oserializer & - get_basic_serializer() const { + const basic_oserializer & + get_basic_serializer() const BOOST_OVERRIDE { return boost::serialization::singleton< oserializer >::get_const_instance(); } - virtual BOOST_DLLEXPORT void save_object_ptr( + BOOST_DLLEXPORT void save_object_ptr( basic_oarchive & ar, const void * x - ) const BOOST_USED; + ) const BOOST_OVERRIDE BOOST_USED; public: pointer_oserializer(); - ~pointer_oserializer(); + ~pointer_oserializer() BOOST_OVERRIDE; }; #ifdef BOOST_MSVC @@ -196,11 +198,11 @@ BOOST_DLLEXPORT void pointer_oserializer::save_object_ptr( // be specialized by the user. T * t = static_cast(const_cast(x)); const unsigned int file_version = boost::serialization::version< T >::value; - Archive & ar_impl + Archive & ar_impl = boost::serialization::smart_cast_reference(ar); boost::serialization::save_construct_data_adl( - ar_impl, - t, + ar_impl, + t, file_version ); ar_impl << boost::serialization::make_nvp(NULL, * t); @@ -210,14 +212,14 @@ template pointer_oserializer::pointer_oserializer() : basic_pointer_oserializer( boost::serialization::singleton< - typename + typename boost::serialization::type_info_implementation< T >::type >::get_const_instance() ) { // make sure appropriate member function is instantiated boost::serialization::singleton< - oserializer + oserializer >::get_mutable_instance().set_bpos(this); archive_serializer_map::insert(this); } @@ -244,8 +246,8 @@ struct save_non_pointer_type { // make sure call is routed through the highest interface that might // be specialized by the user. boost::serialization::serialize_adl( - ar, - const_cast(t), + ar, + const_cast(t), ::boost::serialization::version< T >::value ); } @@ -281,7 +283,7 @@ struct save_non_pointer_type { template static void invoke(Archive & ar, const T & t){ - typedef + typedef typename mpl::eval_if< // if its primitive mpl::equal_to< @@ -310,7 +312,7 @@ struct save_non_pointer_type { // else // do a fast save only tracking is turned off mpl::identity - > > >::type typex; + > > >::type typex; check_object_versioning< T >(); typex::invoke(ar, t); } @@ -344,15 +346,15 @@ struct save_pointer_type { template static const basic_pointer_oserializer * register_type(Archive &ar, T* const /*t*/){ - // there should never be any need to save an abstract polymorphic + // there should never be any need to save an abstract polymorphic // class pointer. Inhibiting code generation for this // permits abstract base classes to be used - note: exception // virtual serialize functions used for plug-ins - typedef + typedef typename mpl::eval_if< boost::serialization::is_abstract< T >, mpl::identity, - mpl::identity + mpl::identity >::type typex; return typex::template register_type< T >(ar); } @@ -361,10 +363,10 @@ struct save_pointer_type { { template static void save( - Archive &ar, + Archive &ar, T & t ){ - const basic_pointer_oserializer & bpos = + const basic_pointer_oserializer & bpos = boost::serialization::singleton< pointer_oserializer >::get_const_instance(); @@ -377,13 +379,13 @@ struct save_pointer_type { { template static void save( - Archive &ar, + Archive &ar, T & t ){ - typename + typename boost::serialization::type_info_implementation< T >::type const & i = boost::serialization::singleton< - typename + typename boost::serialization::type_info_implementation< T >::type >::get_const_instance(); @@ -417,8 +419,8 @@ struct save_pointer_type { // convert pointer to more derived type. if this is thrown // it means that the base/derived relationship hasn't be registered vp = serialization::void_downcast( - *true_type, - *this_type, + *true_type, + *this_type, static_cast(&t) ); if(NULL == vp){ @@ -431,7 +433,7 @@ struct save_pointer_type { ); } - // since true_type is valid, and this only gets made if the + // since true_type is valid, and this only gets made if the // pointer oserializer object has been created, this should never // fail const basic_pointer_oserializer * bpos @@ -454,7 +456,7 @@ struct save_pointer_type { template static void save( - Archive & ar, + Archive & ar, const T & t ){ check_pointer_level< T >(); @@ -471,7 +473,7 @@ struct save_pointer_type { static void invoke(Archive &ar, const TPtr t){ register_type(ar, t); if(NULL == t){ - basic_oarchive & boa + basic_oarchive & boa = boost::serialization::smart_cast_reference(ar); boa.save_null_pointer(); save_access::end_preamble(ar); @@ -498,11 +500,11 @@ struct save_array_type template static void invoke(Archive &ar, const T &t){ typedef typename boost::remove_extent< T >::type value_type; - + save_access::end_preamble(ar); // consider alignment std::size_t c = sizeof(t) / ( - static_cast(static_cast(&t[1])) + static_cast(static_cast(&t[1])) - static_cast(static_cast(&t[0])) ); boost::serialization::collection_size_type count(c); @@ -522,7 +524,7 @@ struct save_array_type template inline void save(Archive & ar, /*const*/ T &t){ - typedef + typedef typename mpl::eval_if, mpl::identity >, //else diff --git a/boost/archive/detail/polymorphic_iarchive_route.hpp b/boost/archive/detail/polymorphic_iarchive_route.hpp index 105685eb..381c50eb 100644 --- a/boost/archive/detail/polymorphic_iarchive_route.hpp +++ b/boost/archive/detail/polymorphic_iarchive_route.hpp @@ -56,125 +56,125 @@ class polymorphic_iarchive_route : { private: // these are used by the serialization library. - virtual void load_object( + void load_object( void *t, const basic_iserializer & bis - ){ + ) BOOST_OVERRIDE { ArchiveImplementation::load_object(t, bis); } - virtual const basic_pointer_iserializer * load_pointer( + const basic_pointer_iserializer * load_pointer( void * & t, const basic_pointer_iserializer * bpis_ptr, const basic_pointer_iserializer * (*finder)( const boost::serialization::extended_type_info & type ) - ){ + ) BOOST_OVERRIDE { return ArchiveImplementation::load_pointer(t, bpis_ptr, finder); } - virtual void set_library_version(library_version_type archive_library_version){ + void set_library_version(boost::serialization::library_version_type archive_library_version) BOOST_OVERRIDE { ArchiveImplementation::set_library_version(archive_library_version); } - virtual library_version_type get_library_version() const{ + boost::serialization::library_version_type get_library_version() const BOOST_OVERRIDE { return ArchiveImplementation::get_library_version(); } - virtual unsigned int get_flags() const { + unsigned int get_flags() const BOOST_OVERRIDE { return ArchiveImplementation::get_flags(); } - virtual void delete_created_pointers(){ + void delete_created_pointers() BOOST_OVERRIDE { ArchiveImplementation::delete_created_pointers(); } - virtual void reset_object_address( + void reset_object_address( const void * new_address, const void * old_address - ){ + ) BOOST_OVERRIDE { ArchiveImplementation::reset_object_address(new_address, old_address); } - virtual void load_binary(void * t, std::size_t size){ + void load_binary(void * t, std::size_t size) BOOST_OVERRIDE { ArchiveImplementation::load_binary(t, size); } // primitive types the only ones permitted by polymorphic archives - virtual void load(bool & t){ + void load(bool & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } - virtual void load(char & t){ + void load(char & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } - virtual void load(signed char & t){ + void load(signed char & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } - virtual void load(unsigned char & t){ + void load(unsigned char & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } #ifndef BOOST_NO_CWCHAR #ifndef BOOST_NO_INTRINSIC_WCHAR_T - virtual void load(wchar_t & t){ + void load(wchar_t & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } #endif #endif - virtual void load(short & t){ + void load(short & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } - virtual void load(unsigned short & t){ + void load(unsigned short & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } - virtual void load(int & t){ + void load(int & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } - virtual void load(unsigned int & t){ + void load(unsigned int & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } - virtual void load(long & t){ + void load(long & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } - virtual void load(unsigned long & t){ + void load(unsigned long & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } #if defined(BOOST_HAS_LONG_LONG) - virtual void load(boost::long_long_type & t){ + void load(boost::long_long_type & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } - virtual void load(boost::ulong_long_type & t){ + void load(boost::ulong_long_type & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } #elif defined(BOOST_HAS_MS_INT64) - virtual void load(__int64 & t){ + void load(__int64 & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } - virtual void load(unsigned __int64 & t){ + void load(unsigned __int64 & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } #endif - virtual void load(float & t){ + void load(float & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } - virtual void load(double & t){ + void load(double & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } - virtual void load(std::string & t){ + void load(std::string & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } #ifndef BOOST_NO_STD_WSTRING - virtual void load(std::wstring & t){ + void load(std::wstring & t) BOOST_OVERRIDE { ArchiveImplementation::load(t); } #endif // used for xml and other tagged formats default does nothing - virtual void load_start(const char * name){ + void load_start(const char * name) BOOST_OVERRIDE { ArchiveImplementation::load_start(name); } - virtual void load_end(const char * name){ + void load_end(const char * name) BOOST_OVERRIDE { ArchiveImplementation::load_end(name); } - virtual void register_basic_serializer(const basic_iserializer & bis){ + void register_basic_serializer(const basic_iserializer & bis) BOOST_OVERRIDE { ArchiveImplementation::register_basic_serializer(bis); } - virtual helper_collection & - get_helper_collection(){ + helper_collection & + get_helper_collection() BOOST_OVERRIDE { return ArchiveImplementation::get_helper_collection(); } public: - // this can't be inheriteded because they appear in mulitple + // this can't be inherited because they appear in multiple // parents typedef mpl::bool_ is_loading; typedef mpl::bool_ is_saving; @@ -190,7 +190,7 @@ public: } // register type function template - const basic_pointer_iserializer * + const basic_pointer_iserializer * register_type(T * t = NULL){ return ArchiveImplementation::register_type(t); } @@ -202,7 +202,7 @@ public: ) : ArchiveImplementation(is, flags) {} - virtual ~polymorphic_iarchive_route(){}; + ~polymorphic_iarchive_route() BOOST_OVERRIDE {} }; } // namespace detail diff --git a/boost/archive/detail/polymorphic_oarchive_route.hpp b/boost/archive/detail/polymorphic_oarchive_route.hpp index b23fd6bf..be67742d 100644 --- a/boost/archive/detail/polymorphic_oarchive_route.hpp +++ b/boost/archive/detail/polymorphic_oarchive_route.hpp @@ -56,116 +56,116 @@ class polymorphic_oarchive_route : { private: // these are used by the serialization library. - virtual void save_object( + void save_object( const void *x, const detail::basic_oserializer & bos - ){ + ) BOOST_OVERRIDE { ArchiveImplementation::save_object(x, bos); } - virtual void save_pointer( + void save_pointer( const void * t, const detail::basic_pointer_oserializer * bpos_ptr - ){ + ) BOOST_OVERRIDE { ArchiveImplementation::save_pointer(t, bpos_ptr); } - virtual void save_null_pointer(){ + void save_null_pointer() BOOST_OVERRIDE { ArchiveImplementation::save_null_pointer(); } // primitive types the only ones permitted by polymorphic archives - virtual void save(const bool t){ + void save(const bool t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } - virtual void save(const char t){ + void save(const char t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } - virtual void save(const signed char t){ + void save(const signed char t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } - virtual void save(const unsigned char t){ + void save(const unsigned char t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } #ifndef BOOST_NO_CWCHAR #ifndef BOOST_NO_INTRINSIC_WCHAR_T - virtual void save(const wchar_t t){ + void save(const wchar_t t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } #endif #endif - virtual void save(const short t){ + void save(const short t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } - virtual void save(const unsigned short t){ + void save(const unsigned short t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } - virtual void save(const int t){ + void save(const int t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } - virtual void save(const unsigned int t){ + void save(const unsigned int t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } - virtual void save(const long t){ + void save(const long t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } - virtual void save(const unsigned long t){ + void save(const unsigned long t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } #if defined(BOOST_HAS_LONG_LONG) - virtual void save(const boost::long_long_type t){ + void save(const boost::long_long_type t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } - virtual void save(const boost::ulong_long_type t){ + void save(const boost::ulong_long_type t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } #elif defined(BOOST_HAS_MS_INT64) - virtual void save(const boost::int64_t t){ + void save(const boost::int64_t t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } - virtual void save(const boost::uint64_t t){ + void save(const boost::uint64_t t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } #endif - virtual void save(const float t){ + void save(const float t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } - virtual void save(const double t){ + void save(const double t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } - virtual void save(const std::string & t){ + void save(const std::string & t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } #ifndef BOOST_NO_STD_WSTRING - virtual void save(const std::wstring & t){ + void save(const std::wstring & t) BOOST_OVERRIDE { ArchiveImplementation::save(t); } #endif - virtual library_version_type get_library_version() const{ + boost::serialization::library_version_type get_library_version() const BOOST_OVERRIDE { return ArchiveImplementation::get_library_version(); } - virtual unsigned int get_flags() const { + unsigned int get_flags() const BOOST_OVERRIDE { return ArchiveImplementation::get_flags(); } - virtual void save_binary(const void * t, std::size_t size){ + void save_binary(const void * t, std::size_t size) BOOST_OVERRIDE { ArchiveImplementation::save_binary(t, size); } // used for xml and other tagged formats default does nothing - virtual void save_start(const char * name){ + void save_start(const char * name) BOOST_OVERRIDE { ArchiveImplementation::save_start(name); } - virtual void save_end(const char * name){ + void save_end(const char * name) BOOST_OVERRIDE { ArchiveImplementation::save_end(name); } - virtual void end_preamble(){ + void end_preamble() BOOST_OVERRIDE { ArchiveImplementation::end_preamble(); } - virtual void register_basic_serializer(const detail::basic_oserializer & bos){ + void register_basic_serializer(const detail::basic_oserializer & bos) BOOST_OVERRIDE { ArchiveImplementation::register_basic_serializer(bos); } - virtual helper_collection & - get_helper_collection(){ + helper_collection & + get_helper_collection() BOOST_OVERRIDE { return ArchiveImplementation::get_helper_collection(); } public: - // this can't be inheriteded because they appear in mulitple + // this can't be inherited because they appear in multiple // parents typedef mpl::bool_ is_loading; typedef mpl::bool_ is_saving; @@ -181,7 +181,7 @@ public: } // register type function template - const basic_pointer_oserializer * + const basic_pointer_oserializer * register_type(T * t = NULL){ return ArchiveImplementation::register_type(t); } @@ -193,7 +193,7 @@ public: ) : ArchiveImplementation(os, flags) {} - virtual ~polymorphic_oarchive_route(){}; + ~polymorphic_oarchive_route() BOOST_OVERRIDE {} }; } // namespace detail diff --git a/boost/archive/detail/register_archive.hpp b/boost/archive/detail/register_archive.hpp index 5ffecc70..ebc24c05 100644 --- a/boost/archive/detail/register_archive.hpp +++ b/boost/archive/detail/register_archive.hpp @@ -4,7 +4,7 @@ #ifndef BOOST_ARCHIVE_DETAIL_REGISTER_ARCHIVE_DWA2006521_HPP # define BOOST_ARCHIVE_DETAIL_REGISTER_ARCHIVE_DWA2006521_HPP -namespace boost { namespace archive { namespace detail { +namespace boost { namespace archive { namespace detail { // No instantiate_ptr_serialization overloads generated by // BOOST_SERIALIZATION_REGISTER_ARCHIVE that lexically follow the call diff --git a/boost/archive/detail/utf8_codecvt_facet.hpp b/boost/archive/detail/utf8_codecvt_facet.hpp index 00b2b419..5c785484 100644 --- a/boost/archive/detail/utf8_codecvt_facet.hpp +++ b/boost/archive/detail/utf8_codecvt_facet.hpp @@ -17,7 +17,6 @@ #include #define BOOST_UTF8_BEGIN_NAMESPACE \ namespace boost { namespace archive { namespace detail { -#define BOOST_UTF8_DECL BOOST_ARCHIVE_DECL #define BOOST_UTF8_END_NAMESPACE }}} #include diff --git a/boost/archive/dinkumware.hpp b/boost/archive/dinkumware.hpp index 90ba6271..97efcea1 100644 --- a/boost/archive/dinkumware.hpp +++ b/boost/archive/dinkumware.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // dinkumware.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -29,7 +29,7 @@ namespace std { // define i/o operators for 64 bit integers template -basic_ostream & +basic_ostream & operator<<(basic_ostream & os, boost::uint64_t t){ // octal rendering of 64 bit number would be 22 octets + eos CharType d[23]; @@ -66,7 +66,7 @@ operator<<(basic_ostream & os, boost::uint64_t t){ } template -basic_ostream & +basic_ostream & operator<<(basic_ostream &os, boost::int64_t t){ if(0 <= t){ os << static_cast(t); @@ -79,7 +79,7 @@ operator<<(basic_ostream &os, boost::int64_t t){ } template -basic_istream & +basic_istream & operator>>(basic_istream &is, boost::int64_t & t){ CharType d; do{ @@ -119,7 +119,7 @@ operator>>(basic_istream &is, boost::int64_t & t){ } template -basic_istream & +basic_istream & operator>>(basic_istream &is, boost::uint64_t & t){ boost::int64_t it; is >> it; @@ -127,10 +127,8 @@ operator>>(basic_istream &is, boost::uint64_t & t){ return is; } -//#endif - template<> -class back_insert_iterator > : public +class back_insert_iterator > : public iterator { public: @@ -140,7 +138,7 @@ public: explicit back_insert_iterator(container_type & s) : container(& s) {} // construct with container - + back_insert_iterator & operator=( container_type::const_reference Val_ ){ // push value into container @@ -167,7 +165,7 @@ protected: container_type *container; // pointer to container }; -template +template inline back_insert_iterator > back_inserter( basic_string & s ){ @@ -175,7 +173,7 @@ inline back_insert_iterator > back_inserter( } template<> -class back_insert_iterator > : public +class back_insert_iterator > : public iterator { public: @@ -185,7 +183,7 @@ public: explicit back_insert_iterator(container_type & s) : container(& s) {} // construct with container - + back_insert_iterator & operator=( container_type::const_reference Val_ ){ // push value into container @@ -212,7 +210,7 @@ protected: container_type *container; // pointer to container }; -template +template inline back_insert_iterator > back_inserter( basic_string & s ){ diff --git a/boost/archive/impl/basic_binary_iarchive.ipp b/boost/archive/impl/basic_binary_iarchive.ipp index d5619ab6..1755250e 100644 --- a/boost/archive/impl/basic_binary_iarchive.ipp +++ b/boost/archive/impl/basic_binary_iarchive.ipp @@ -22,7 +22,7 @@ namespace std{ #endif #include -#include +#include #include @@ -48,7 +48,7 @@ basic_binary_iarchive::load_override(class_name_type & t){ template BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_binary_iarchive::init(void){ +basic_binary_iarchive::init() { // read signature in an archive version independent manner std::string file_signature; @@ -84,12 +84,12 @@ basic_binary_iarchive::init(void){ // make sure the version of the reading archive library can // support the format of the archive being read - library_version_type input_library_version; + boost::serialization::library_version_type input_library_version; //* this->This() >> input_library_version; { int v = 0; v = this->This()->m_sb.sbumpc(); - #if defined(BOOST_LITTLE_ENDIAN) + #if BOOST_ENDIAN_LITTLE_BYTE if(v < 6){ ; } @@ -111,11 +111,11 @@ basic_binary_iarchive::init(void){ // version 8+ followed by a zero this->This()->m_sb.sbumpc(); } - #elif defined(BOOST_BIG_ENDIAN) + #elif BOOST_ENDIAN_BIG_BYTE if(v == 0) v = this->This()->m_sb.sbumpc(); #endif - input_library_version = static_cast(v); + input_library_version = static_cast(v); } #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) diff --git a/boost/archive/impl/basic_binary_oarchive.ipp b/boost/archive/impl/basic_binary_oarchive.ipp index d5a019d3..b83ac619 100644 --- a/boost/archive/impl/basic_binary_oarchive.ipp +++ b/boost/archive/impl/basic_binary_oarchive.ipp @@ -34,7 +34,7 @@ basic_binary_oarchive::init(){ const std::string file_signature(BOOST_ARCHIVE_SIGNATURE()); * this->This() << file_signature; // write library version - const library_version_type v(BOOST_ARCHIVE_VERSION()); + const boost::serialization::library_version_type v(BOOST_ARCHIVE_VERSION()); * this->This() << v; } diff --git a/boost/archive/impl/basic_text_iarchive.ipp b/boost/archive/impl/basic_text_iarchive.ipp index 9ec8c658..3e2def95 100644 --- a/boost/archive/impl/basic_text_iarchive.ipp +++ b/boost/archive/impl/basic_text_iarchive.ipp @@ -45,7 +45,7 @@ basic_text_iarchive::load_override(class_name_type & t){ template BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_text_iarchive::init(void){ +basic_text_iarchive::init() { // read signature in an archive version independent manner std::string file_signature; * this->This() >> file_signature; @@ -56,7 +56,7 @@ basic_text_iarchive::init(void){ // make sure the version of the reading archive library can // support the format of the archive being read - library_version_type input_library_version; + boost::serialization::library_version_type input_library_version; * this->This() >> input_library_version; #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) diff --git a/boost/archive/impl/basic_text_iprimitive.ipp b/boost/archive/impl/basic_text_iprimitive.ipp index 4e447280..cad9c3f8 100644 --- a/boost/archive/impl/basic_text_iprimitive.ipp +++ b/boost/archive/impl/basic_text_iprimitive.ipp @@ -112,8 +112,8 @@ basic_text_iprimitive::basic_text_iprimitive( ) : is(is_), flags_saver(is_), - precision_saver(is_), #ifndef BOOST_NO_STD_LOCALE + precision_saver(is_), codecvt_null_facet(1), archive_locale(is.getloc(), & codecvt_null_facet), locale_saver(is) @@ -125,6 +125,7 @@ basic_text_iprimitive::basic_text_iprimitive( is_ >> std::noboolalpha; } #else + precision_saver(is_) {} #endif diff --git a/boost/archive/impl/basic_text_oarchive.ipp b/boost/archive/impl/basic_text_oarchive.ipp index 44bc1401..50084ca0 100644 --- a/boost/archive/impl/basic_text_oarchive.ipp +++ b/boost/archive/impl/basic_text_oarchive.ipp @@ -54,7 +54,7 @@ basic_text_oarchive::init(){ const std::string file_signature(BOOST_ARCHIVE_SIGNATURE()); * this->This() << file_signature; // write library version - const library_version_type v(BOOST_ARCHIVE_VERSION()); + const boost::serialization::library_version_type v(BOOST_ARCHIVE_VERSION()); * this->This() << v; } diff --git a/boost/archive/impl/basic_text_oprimitive.ipp b/boost/archive/impl/basic_text_oprimitive.ipp index 6030fd44..98a8879b 100644 --- a/boost/archive/impl/basic_text_oprimitive.ipp +++ b/boost/archive/impl/basic_text_oprimitive.ipp @@ -10,7 +10,6 @@ #include // NULL #include // std::copy -#include // std::uncaught_exception #include #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ @@ -18,6 +17,8 @@ namespace std{ } // namespace std #endif +#include + #include #include @@ -86,8 +87,8 @@ basic_text_oprimitive::basic_text_oprimitive( ) : os(os_), flags_saver(os_), - precision_saver(os_), #ifndef BOOST_NO_STD_LOCALE + precision_saver(os_), codecvt_null_facet(1), archive_locale(os.getloc(), & codecvt_null_facet), locale_saver(os) @@ -99,6 +100,7 @@ basic_text_oprimitive::basic_text_oprimitive( os_ << std::noboolalpha; } #else + precision_saver(os_) {} #endif @@ -106,7 +108,7 @@ basic_text_oprimitive::basic_text_oprimitive( template BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_text_oprimitive::~basic_text_oprimitive(){ - if(std::uncaught_exception()) + if(boost::core::uncaught_exceptions() > 0) return; os << std::endl; } diff --git a/boost/archive/impl/basic_xml_grammar.hpp b/boost/archive/impl/basic_xml_grammar.hpp index cc88d4fd..8f70e3d2 100644 --- a/boost/archive/impl/basic_xml_grammar.hpp +++ b/boost/archive/impl/basic_xml_grammar.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_xml_grammar.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -70,7 +70,7 @@ public: // one compiler (Compaq C++ 6.5 in strict_ansi mode) chokes otherwise. struct return_values; friend struct return_values; - + private: typedef typename std::basic_istream IStream; typedef typename std::basic_string StringType; @@ -81,16 +81,16 @@ private: > scanner_t; typedef typename boost::spirit::classic::rule rule_t; // Start grammar definition - rule_t + rule_t Reference, - Eq, + Eq, STag, ETag, LetterOrUnderscoreOrColon, - AttValue, - CharRef1, - CharRef2, - CharRef, + AttValue, + CharRef1, + CharRef2, + CharRef, AmpRef, LTRef, GTRef, @@ -127,11 +127,11 @@ private: chset_t BaseChar, Ideographic, - Char, - Letter, + Char, + Letter, Digit, CombiningChar, - Extender, + Extender, Sch, NameChar; @@ -139,7 +139,7 @@ private: bool my_parse( IStream & is, - const rule_t &rule_, + const rule_t &rule_, const CharType delimiter = L'>' ) const ; public: diff --git a/boost/archive/impl/basic_xml_iarchive.ipp b/boost/archive/impl/basic_xml_iarchive.ipp index 625458b9..f7490530 100644 --- a/boost/archive/impl/basic_xml_iarchive.ipp +++ b/boost/archive/impl/basic_xml_iarchive.ipp @@ -37,7 +37,6 @@ basic_xml_iarchive::load_start(const char *name){ } // don't check start tag at highest level ++depth; - return; } template diff --git a/boost/archive/impl/text_iarchive_impl.ipp b/boost/archive/impl/text_iarchive_impl.ipp index ae4e2750..a3a80c04 100644 --- a/boost/archive/impl/text_iarchive_impl.ipp +++ b/boost/archive/impl/text_iarchive_impl.ipp @@ -115,14 +115,7 @@ text_iarchive_impl::text_iarchive_impl( 0 != (flags & no_codecvt) ), basic_text_iarchive(flags) -{ - if(0 == (flags & no_header)) - #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) - this->init(); - #else - this->basic_text_iarchive::init(); - #endif -} +{} } // namespace archive } // namespace boost diff --git a/boost/archive/impl/text_oarchive_impl.ipp b/boost/archive/impl/text_oarchive_impl.ipp index 37d8664a..26fbc23a 100644 --- a/boost/archive/impl/text_oarchive_impl.ipp +++ b/boost/archive/impl/text_oarchive_impl.ipp @@ -93,12 +93,6 @@ text_oarchive_impl::text_oarchive_impl( ), basic_text_oarchive(flags) { - if(0 == (flags & no_header)) - #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) - this->init(); - #else - this->basic_text_oarchive::init(); - #endif } template diff --git a/boost/archive/impl/text_wiarchive_impl.ipp b/boost/archive/impl/text_wiarchive_impl.ipp index e85625ac..e421fa55 100644 --- a/boost/archive/impl/text_wiarchive_impl.ipp +++ b/boost/archive/impl/text_wiarchive_impl.ipp @@ -108,8 +108,6 @@ text_wiarchive_impl::text_wiarchive_impl( ), basic_text_iarchive(flags) { - if(0 == (flags & no_header)) - basic_text_iarchive::init(); } } // archive diff --git a/boost/archive/impl/xml_iarchive_impl.ipp b/boost/archive/impl/xml_iarchive_impl.ipp index efc32e01..b0847d4a 100644 --- a/boost/archive/impl/xml_iarchive_impl.ipp +++ b/boost/archive/impl/xml_iarchive_impl.ipp @@ -11,7 +11,6 @@ #include #include // memcpy #include // NULL -#include #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ @@ -34,6 +33,7 @@ namespace std{ #include #endif +#include #include #include @@ -165,7 +165,7 @@ BOOST_ARCHIVE_DECL void xml_iarchive_impl::init(){ gimpl->init(is); this->set_library_version( - library_version_type(gimpl->rv.version) + boost::serialization::library_version_type(gimpl->rv.version) ); } @@ -181,15 +181,12 @@ xml_iarchive_impl::xml_iarchive_impl( ), basic_xml_iarchive(flags), gimpl(new xml_grammar()) -{ - if(0 == (flags & no_header)) - init(); -} +{} template BOOST_ARCHIVE_DECL xml_iarchive_impl::~xml_iarchive_impl(){ - if(std::uncaught_exception()) + if(boost::core::uncaught_exceptions() > 0) return; if(0 == (this->get_flags() & no_header)){ gimpl->windup(is); diff --git a/boost/archive/impl/xml_oarchive_impl.ipp b/boost/archive/impl/xml_oarchive_impl.ipp index 5ebd454e..0f4ccbbf 100644 --- a/boost/archive/impl/xml_oarchive_impl.ipp +++ b/boost/archive/impl/xml_oarchive_impl.ipp @@ -10,7 +10,6 @@ #include #include // std::copy #include -#include #include // strlen #include // msvc 6.0 needs this to suppress warnings @@ -20,6 +19,7 @@ namespace std{ } // namespace std #endif +#include #include #include @@ -109,10 +109,7 @@ xml_oarchive_impl::xml_oarchive_impl( 0 != (flags & no_codecvt) ), basic_xml_oarchive(flags) -{ - if(0 == (flags & no_header)) - this->init(); -} +{} template BOOST_ARCHIVE_DECL void @@ -132,7 +129,7 @@ xml_oarchive_impl::save_binary(const void *address, std::size_t count){ template BOOST_ARCHIVE_DECL xml_oarchive_impl::~xml_oarchive_impl(){ - if(std::uncaught_exception()) + if(boost::core::uncaught_exceptions() > 0) return; if(0 == (this->get_flags() & no_header)) this->windup(); diff --git a/boost/archive/impl/xml_wiarchive_impl.ipp b/boost/archive/impl/xml_wiarchive_impl.ipp index f572b762..198dfafb 100644 --- a/boost/archive/impl/xml_wiarchive_impl.ipp +++ b/boost/archive/impl/xml_wiarchive_impl.ipp @@ -20,13 +20,13 @@ namespace std{ #include #include // std::copy -#include // uncaught exception #include // Dinkumware and RogueWave #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) #include #endif #include +#include #include #include @@ -143,7 +143,7 @@ BOOST_WARCHIVE_DECL void xml_wiarchive_impl::init(){ gimpl->init(is); this->set_library_version( - library_version_type(gimpl->rv.version) + boost::serialization::library_version_type(gimpl->rv.version) ); } @@ -169,14 +169,12 @@ xml_wiarchive_impl::xml_wiarchive_impl( is_.sync(); is_.imbue(archive_locale); } - if(0 == (flags & no_header)) - init(); } template BOOST_WARCHIVE_DECL xml_wiarchive_impl::~xml_wiarchive_impl(){ - if(std::uncaught_exception()) + if(boost::core::uncaught_exceptions() > 0) return; if(0 == (this->get_flags() & no_header)){ gimpl->windup(is); diff --git a/boost/archive/impl/xml_woarchive_impl.ipp b/boost/archive/impl/xml_woarchive_impl.ipp index 630898b8..dabaf230 100644 --- a/boost/archive/impl/xml_woarchive_impl.ipp +++ b/boost/archive/impl/xml_woarchive_impl.ipp @@ -13,7 +13,6 @@ #include #include // std::copy #include -#include #include // strlen #include // mbtowc @@ -32,6 +31,8 @@ namespace std{ } // namespace std #endif +#include + #include #include @@ -132,14 +133,12 @@ xml_woarchive_impl::xml_woarchive_impl( os_.flush(); os_.imbue(archive_locale); } - if(0 == (flags & no_header)) - this->init(); } template BOOST_WARCHIVE_DECL xml_woarchive_impl::~xml_woarchive_impl(){ - if(std::uncaught_exception()) + if(boost::core::uncaught_exceptions() > 0) return; if(0 == (this->get_flags() & no_header)){ os << L""; diff --git a/boost/archive/iterators/base64_from_binary.hpp b/boost/archive/iterators/base64_from_binary.hpp index ee849944..bd0b38fa 100644 --- a/boost/archive/iterators/base64_from_binary.hpp +++ b/boost/archive/iterators/base64_from_binary.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // base64_from_binary.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -20,15 +20,15 @@ #include // size_t #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif #include #include -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -68,10 +68,10 @@ struct from_6_bit { //template template< - class Base, + class Base, class CharType = typename boost::iterator_value::type > -class base64_from_binary : +class base64_from_binary : public transform_iterator< detail::from_6_bit, Base @@ -93,7 +93,7 @@ public: ) {} // intel 7.1 doesn't like default copy constructor - base64_from_binary(const base64_from_binary & rhs) : + base64_from_binary(const base64_from_binary & rhs) : super_t( Base(rhs.base_reference()), detail::from_6_bit() diff --git a/boost/archive/iterators/binary_from_base64.hpp b/boost/archive/iterators/binary_from_base64.hpp index 89b8f889..5aeccb3a 100644 --- a/boost/archive/iterators/binary_from_base64.hpp +++ b/boost/archive/iterators/binary_from_base64.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_from_base64.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -24,7 +24,7 @@ #include #include -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -78,7 +78,7 @@ struct to_6_bit { // ideal. This is also addressed here. template< - class Base, + class Base, class CharType = typename boost::iterator_value::type > class binary_from_base64 : public @@ -102,7 +102,7 @@ public: ) {} // intel 7.1 doesn't like default copy constructor - binary_from_base64(const binary_from_base64 & rhs) : + binary_from_base64(const binary_from_base64 & rhs) : super_t( Base(rhs.base_reference()), detail::to_6_bit() diff --git a/boost/archive/iterators/dataflow_exception.hpp b/boost/archive/iterators/dataflow_exception.hpp index e3e18605..a144a8bd 100644 --- a/boost/archive/iterators/dataflow_exception.hpp +++ b/boost/archive/iterators/dataflow_exception.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // dataflow_exception.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -46,7 +46,7 @@ public: dataflow_exception(exception_code c = other_exception) : code(c) {} - virtual const char *what( ) const throw( ) + const char *what( ) const throw( ) BOOST_OVERRIDE { const char *msg = "unknown exception code"; switch(code){ diff --git a/boost/archive/iterators/escape.hpp b/boost/archive/iterators/escape.hpp index 103b31e0..9af34ac9 100644 --- a/boost/archive/iterators/escape.hpp +++ b/boost/archive/iterators/escape.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // escape.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -22,7 +22,7 @@ #include #include -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -30,10 +30,10 @@ namespace iterators { // insert escapes into text template -class escape : +class escape : public boost::iterator_adaptor< - Derived, - Base, + Derived, + Base, typename boost::iterator_value::type, single_pass_traversal_tag, typename boost::iterator_value::type @@ -44,8 +44,8 @@ class escape : friend class boost::iterator_core_access; typedef typename boost::iterator_adaptor< - Derived, - Base, + Derived, + Base, base_value_type, single_pass_traversal_tag, base_value_type @@ -58,7 +58,7 @@ class escape : m_full = true; } - //Access the value referred to + //Access the value referred to reference_type dereference() const { if(!m_full) const_cast(this)->dereference_impl(); @@ -98,7 +98,7 @@ class escape : bool m_full; base_value_type m_current_value; public: - escape(Base base) : + escape(Base base) : super_t(base), m_bnext(NULL), m_bend(NULL), diff --git a/boost/archive/iterators/insert_linebreaks.hpp b/boost/archive/iterators/insert_linebreaks.hpp index 2504b030..c75ea841 100644 --- a/boost/archive/iterators/insert_linebreaks.hpp +++ b/boost/archive/iterators/insert_linebreaks.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // insert_linebreaks.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -26,18 +26,18 @@ namespace std{ using ::memcpy; } #include #include -namespace boost { +namespace boost { namespace archive { namespace iterators { /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // insert line break every N characters template< - class Base, - int N, + class Base, + int N, class CharType = typename boost::iterator_value::type > -class insert_linebreaks : +class insert_linebreaks : public iterator_adaptor< insert_linebreaks, Base, @@ -86,7 +86,7 @@ public: m_count(0) {} // intel 7.1 doesn't like default copy constructor - insert_linebreaks(const insert_linebreaks & rhs) : + insert_linebreaks(const insert_linebreaks & rhs) : super_t(rhs.base_reference()), m_count(rhs.m_count) {} diff --git a/boost/archive/iterators/istream_iterator.hpp b/boost/archive/iterators/istream_iterator.hpp index a187f605..05b87996 100644 --- a/boost/archive/iterators/istream_iterator.hpp +++ b/boost/archive/iterators/istream_iterator.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // istream_iterator.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -25,13 +25,13 @@ #include #include -namespace boost { +namespace boost { namespace archive { namespace iterators { // given a type, make an input iterator based on a pointer to that type template -class istream_iterator : +class istream_iterator : public boost::iterator_facade< istream_iterator, Elem, @@ -48,13 +48,13 @@ class istream_iterator : Elem > super_t; typedef typename std::basic_istream istream_type; - + bool equal(const this_t & rhs) const { // note: only works for comparison against end of stream return m_istream == rhs.m_istream; } - //Access the value referred to + //Access the value referred to Elem dereference() const { return static_cast(m_istream->peek()); } diff --git a/boost/archive/iterators/mb_from_wchar.hpp b/boost/archive/iterators/mb_from_wchar.hpp index eb30480c..dbd17b7c 100644 --- a/boost/archive/iterators/mb_from_wchar.hpp +++ b/boost/archive/iterators/mb_from_wchar.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // mb_from_wchar.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -23,7 +23,7 @@ #endif #include #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ +namespace std{ using ::mbstate_t; } // namespace std #endif @@ -31,7 +31,7 @@ namespace std{ #include #include -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -41,8 +41,8 @@ namespace iterators { template // the input iterator class mb_from_wchar : public boost::iterator_adaptor< - mb_from_wchar, - Base, + mb_from_wchar, + Base, wchar_t, single_pass_traversal_tag, char @@ -51,8 +51,8 @@ class mb_from_wchar friend class boost::iterator_core_access; typedef typename boost::iterator_adaptor< - mb_from_wchar, - Base, + mb_from_wchar, + Base, wchar_t, single_pass_traversal_tag, char @@ -75,7 +75,7 @@ class mb_from_wchar bool equal(const mb_from_wchar & rhs) const { // once the value is filled, the base_reference has been incremented // so don't permit comparison anymore. - return + return 0 == m_bend && 0 == m_bnext && this->base_reference() == rhs.base_reference() @@ -102,7 +102,7 @@ class mb_from_wchar void increment(){ if(++m_bnext < m_bend) return; - m_bend = + m_bend = m_bnext = 0; ++(this->base_reference()); m_full = false; @@ -127,7 +127,7 @@ public: m_full(false) {} // intel 7.1 doesn't like default copy constructor - mb_from_wchar(const mb_from_wchar & rhs) : + mb_from_wchar(const mb_from_wchar & rhs) : super_t(rhs.base_reference()), m_bend(rhs.m_bend), m_bnext(rhs.m_bnext), diff --git a/boost/archive/iterators/ostream_iterator.hpp b/boost/archive/iterators/ostream_iterator.hpp index 49a9b990..80b5d1d4 100644 --- a/boost/archive/iterators/ostream_iterator.hpp +++ b/boost/archive/iterators/ostream_iterator.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // ostream_iterator.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -24,13 +24,13 @@ #include #include -namespace boost { +namespace boost { namespace archive { namespace iterators { // given a type, make an input iterator based on a pointer to that type template -class ostream_iterator : +class ostream_iterator : public boost::iterator_facade< ostream_iterator, Elem, @@ -43,7 +43,7 @@ class ostream_iterator : typedef Elem char_type; typedef std::basic_ostream ostream_type; - //emulate the behavior of std::ostream + //emulate the behavior of std::ostream ostream_iterator & dereference() const { return const_cast(*this); } diff --git a/boost/archive/iterators/remove_whitespace.hpp b/boost/archive/iterators/remove_whitespace.hpp index c3580ab2..eb756f37 100644 --- a/boost/archive/iterators/remove_whitespace.hpp +++ b/boost/archive/iterators/remove_whitespace.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // remove_whitespace.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -25,7 +25,7 @@ // here is the default standard implementation of the functor used // by the filter iterator to remove spaces. Unfortunately usage // of this implementation in combination with spirit trips a bug -// VC 6.5. The only way I can find to work around it is to +// VC 6.5. The only way I can find to work around it is to // implement a special non-standard version for this platform #ifndef BOOST_NO_CWCTYPE @@ -74,7 +74,7 @@ struct remove_whitespace_predicate /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // convert base64 file data (including whitespace and padding) to binary -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -122,15 +122,15 @@ public: m_full = false; ++(this->base_reference()); } - filter_iterator(Base start) : - super_t(start), + filter_iterator(Base start) : + super_t(start), m_full(false) {} filter_iterator(){} }; template -class remove_whitespace : +class remove_whitespace : public filter_iterator< remove_whitespace_predicate< typename boost::iterator_value::type @@ -155,7 +155,7 @@ public: super_t(Base(static_cast< T >(start))) {} // intel 7.1 doesn't like default copy constructor - remove_whitespace(const remove_whitespace & rhs) : + remove_whitespace(const remove_whitespace & rhs) : super_t(rhs.base_reference()) {} }; diff --git a/boost/archive/iterators/transform_width.hpp b/boost/archive/iterators/transform_width.hpp index 09c050a9..162dccfa 100644 --- a/boost/archive/iterators/transform_width.hpp +++ b/boost/archive/iterators/transform_width.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // transform_width.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -29,7 +29,7 @@ #include // std::min -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -37,12 +37,12 @@ namespace iterators { // class used by text archives to translate char strings to wchar_t // strings of the currently selected locale template< - class Base, - int BitsOut, - int BitsIn, + class Base, + int BitsOut, + int BitsIn, class CharType = typename boost::iterator_value::type // output character > -class transform_width : +class transform_width : public boost::iterator_adaptor< transform_width, Base, @@ -108,19 +108,19 @@ class transform_width : public: // make composible buy using templated constructor template - transform_width(T start) : + transform_width(T start) : super_t(Base(static_cast< T >(start))), m_buffer_out_full(false), m_buffer_out(0), - // To disable GCC warning, but not truly necessary - //(m_buffer_in will be initialized later before being + // To disable GCC warning, but not truly necessary + //(m_buffer_in will be initialized later before being //used because m_remaining_bits == 0) - m_buffer_in(0), + m_buffer_in(0), m_remaining_bits(0), m_end_of_sequence(false) {} // intel 7.1 doesn't like default copy constructor - transform_width(const transform_width & rhs) : + transform_width(const transform_width & rhs) : super_t(rhs.base_reference()), m_buffer_out_full(rhs.m_buffer_out_full), m_buffer_out(rhs.m_buffer_out), @@ -131,9 +131,9 @@ public: }; template< - class Base, - int BitsOut, - int BitsIn, + class Base, + int BitsOut, + int BitsIn, class CharType > void transform_width::fill() { diff --git a/boost/archive/iterators/unescape.hpp b/boost/archive/iterators/unescape.hpp index abf62406..6753c644 100644 --- a/boost/archive/iterators/unescape.hpp +++ b/boost/archive/iterators/unescape.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // unescape.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -21,7 +21,7 @@ #include #include -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -29,10 +29,10 @@ namespace iterators { // class used by text archives to translate char strings to wchar_t // strings of the currently selected locale template -class unescape +class unescape : public boost::iterator_adaptor< unescape, - Base, + Base, typename pointee::type, single_pass_traversal_tag, typename pointee::type @@ -40,8 +40,8 @@ class unescape { friend class boost::iterator_core_access; typedef typename boost::iterator_adaptor< - unescape, - Base, + unescape, + Base, typename pointee::type, single_pass_traversal_tag, typename pointee::type @@ -71,11 +71,11 @@ private: ++(this->base_reference()); dereference_impl(); m_full = false; - }; + } public: - unescape(Base base) : + unescape(Base base) : super_t(base), m_full(false) {} diff --git a/boost/archive/iterators/wchar_from_mb.hpp b/boost/archive/iterators/wchar_from_mb.hpp index 2af8f640..6067245d 100644 --- a/boost/archive/iterators/wchar_from_mb.hpp +++ b/boost/archive/iterators/wchar_from_mb.hpp @@ -9,14 +9,13 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // wchar_from_mb.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for updates, documentation, and revision history. -#include #include #include // size_t #ifndef BOOST_NO_CWCHAR @@ -26,10 +25,12 @@ #include #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ +namespace std{ using ::mbstate_t; } // namespace std #endif +#include +#include #include #include #include @@ -38,7 +39,7 @@ namespace std{ #include -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -46,10 +47,10 @@ namespace iterators { // class used by text archives to translate char strings to wchar_t // strings of the currently selected locale template -class wchar_from_mb +class wchar_from_mb : public boost::iterator_adaptor< - wchar_from_mb, - Base, + wchar_from_mb, + Base, wchar_t, single_pass_traversal_tag, wchar_t @@ -57,8 +58,8 @@ class wchar_from_mb { friend class boost::iterator_core_access; typedef typename boost::iterator_adaptor< - wchar_from_mb, - Base, + wchar_from_mb, + Base, wchar_t, single_pass_traversal_tag, wchar_t @@ -125,7 +126,7 @@ class wchar_from_mb public: // make composible buy using templated constructor template - wchar_from_mb(T start) : + wchar_from_mb(T start) : super_t(Base(static_cast< T >(start))), m_mbs(std::mbstate_t()) { @@ -165,6 +166,7 @@ void wchar_from_mb::drain(){ const typename boost::iterators::iterator_value::type * input_new_start; typename iterator_value::type * next_available; + BOOST_ATTRIBUTE_UNUSED // redundant with ignore_unused below but clarifies intention std::codecvt_base::result r = m_codecvt_facet.in( m_mbs, m_input.m_buffer.begin(), diff --git a/boost/archive/iterators/xml_escape.hpp b/boost/archive/iterators/xml_escape.hpp index c838a73b..c45733ea 100644 --- a/boost/archive/iterators/xml_escape.hpp +++ b/boost/archive/iterators/xml_escape.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_escape.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -19,7 +19,7 @@ #include #include -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -27,7 +27,7 @@ namespace iterators { // insert escapes into xml text template -class xml_escape +class xml_escape : public escape, Base> { friend class boost::iterator_core_access; @@ -43,14 +43,14 @@ public: super_t(Base(static_cast< T >(start))) {} // intel 7.1 doesn't like default copy constructor - xml_escape(const xml_escape & rhs) : + xml_escape(const xml_escape & rhs) : super_t(rhs.base_reference()) {} }; template char xml_escape::fill( - const char * & bstart, + const char * & bstart, const char * & bend ){ char current_value = * this->base_reference(); @@ -83,7 +83,7 @@ char xml_escape::fill( template wchar_t xml_escape::fill( - const wchar_t * & bstart, + const wchar_t * & bstart, const wchar_t * & bend ){ wchar_t current_value = * this->base_reference(); diff --git a/boost/archive/iterators/xml_unescape.hpp b/boost/archive/iterators/xml_unescape.hpp index 9d3c3af9..7fc9fd5f 100644 --- a/boost/archive/iterators/xml_unescape.hpp +++ b/boost/archive/iterators/xml_unescape.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_unescape.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -25,14 +25,14 @@ #include #include -namespace boost { +namespace boost { namespace archive { namespace iterators { /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // replace &??? xml escape sequences with the corresponding characters template -class xml_unescape +class xml_unescape : public unescape, Base> { friend class boost::iterator_core_access; @@ -44,7 +44,7 @@ class xml_unescape return unescape, Base>::dereference(); } public: - // msvc versions prior to 14.0 crash with and ICE + // msvc versions prior to 14.0 crash with and ICE #if BOOST_WORKAROUND(BOOST_MSVC, < 1900) typedef int value_type; #else @@ -55,11 +55,11 @@ public: value_type drain(); template - xml_unescape(T start) : + xml_unescape(T start) : super_t(Base(static_cast< T >(start))) {} // intel 7.1 doesn't like default copy constructor - xml_unescape(const xml_unescape & rhs) : + xml_unescape(const xml_unescape & rhs) : super_t(rhs.base_reference()) {} }; @@ -82,8 +82,8 @@ void xml_unescape::drain_residue(const char * literal){ // iterator refenence which would make subsequent iterator comparisons // incorrect and thereby break the composiblity of iterators. template -typename xml_unescape::value_type -//int +typename xml_unescape::value_type +//int xml_unescape::drain(){ value_type retval = * this->base_reference(); if('&' != retval){ diff --git a/boost/archive/polymorphic_binary_iarchive.hpp b/boost/archive/polymorphic_binary_iarchive.hpp index 20559bd8..c1af77a3 100644 --- a/boost/archive/polymorphic_binary_iarchive.hpp +++ b/boost/archive/polymorphic_binary_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // polymorphic_binary_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -25,17 +25,17 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class BOOST_SYMBOL_VISIBLE polymorphic_binary_iarchive : +class BOOST_SYMBOL_VISIBLE polymorphic_binary_iarchive : public detail::polymorphic_iarchive_route { public: polymorphic_binary_iarchive(std::istream & is, unsigned int flags = 0) : detail::polymorphic_iarchive_route(is, flags) {} - ~polymorphic_binary_iarchive(){} + ~polymorphic_binary_iarchive() BOOST_OVERRIDE {} }; } // namespace archive @@ -51,4 +51,3 @@ BOOST_SERIALIZATION_REGISTER_ARCHIVE( ) #endif // BOOST_ARCHIVE_POLYMORPHIC_BINARY_IARCHIVE_HPP - diff --git a/boost/archive/polymorphic_binary_oarchive.hpp b/boost/archive/polymorphic_binary_oarchive.hpp index 96febd7a..e9282484 100644 --- a/boost/archive/polymorphic_binary_oarchive.hpp +++ b/boost/archive/polymorphic_binary_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // polymorphic_binary_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -20,7 +20,7 @@ #include #include -namespace boost { +namespace boost { namespace archive { class BOOST_SYMBOL_VISIBLE polymorphic_binary_oarchive : @@ -30,7 +30,7 @@ public: polymorphic_binary_oarchive(std::ostream & os, unsigned int flags = 0) : detail::polymorphic_oarchive_route(os, flags) {} - ~polymorphic_binary_oarchive(){} + ~polymorphic_binary_oarchive() BOOST_OVERRIDE {} }; } // namespace archive @@ -42,4 +42,3 @@ BOOST_SERIALIZATION_REGISTER_ARCHIVE( ) #endif // BOOST_ARCHIVE_POLYMORPHIC_BINARY_OARCHIVE_HPP - diff --git a/boost/archive/polymorphic_iarchive.hpp b/boost/archive/polymorphic_iarchive.hpp index d3c59a9f..ade9e5da 100644 --- a/boost/archive/polymorphic_iarchive.hpp +++ b/boost/archive/polymorphic_iarchive.hpp @@ -17,7 +17,7 @@ // See http://www.boost.org for updates, documentation, and revision history. #include // std::size_t -#include // ULONG_MAX +#include // ULONG_MAX #include #include @@ -31,6 +31,7 @@ namespace std{ #include #include +#include #include #include @@ -116,11 +117,13 @@ public: load_end(t.name()); } protected: - virtual ~polymorphic_iarchive_impl(){}; + virtual ~polymorphic_iarchive_impl() {} public: // utility function implemented by all legal archives - virtual void set_library_version(library_version_type archive_library_version) = 0; - virtual library_version_type get_library_version() const = 0; + virtual void set_library_version( + boost::serialization::library_version_type archive_library_version + ) = 0; + virtual boost::serialization::library_version_type get_library_version() const = 0; virtual unsigned int get_flags() const = 0; virtual void delete_created_pointers() = 0; virtual void reset_object_address( @@ -156,7 +159,7 @@ class BOOST_SYMBOL_VISIBLE polymorphic_iarchive : public polymorphic_iarchive_impl { public: - virtual ~polymorphic_iarchive(){}; + ~polymorphic_iarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/boost/archive/polymorphic_oarchive.hpp b/boost/archive/polymorphic_oarchive.hpp index edac4edb..c8146105 100644 --- a/boost/archive/polymorphic_oarchive.hpp +++ b/boost/archive/polymorphic_oarchive.hpp @@ -17,7 +17,7 @@ // See http://www.boost.org for updates, documentation, and revision history. #include // size_t -#include // ULONG_MAX +#include // ULONG_MAX #include #include @@ -118,11 +118,11 @@ public: save_end(t.name()); } protected: - virtual ~polymorphic_oarchive_impl(){}; + virtual ~polymorphic_oarchive_impl() {} public: // utility functions implemented by all legal archives virtual unsigned int get_flags() const = 0; - virtual library_version_type get_library_version() const = 0; + virtual boost::serialization::library_version_type get_library_version() const = 0; virtual void save_binary(const void * t, std::size_t size) = 0; virtual void save_object( @@ -136,11 +136,11 @@ public: }; // note: preserve naming symmetry -class BOOST_SYMBOL_VISIBLE polymorphic_oarchive : +class BOOST_SYMBOL_VISIBLE polymorphic_oarchive : public polymorphic_oarchive_impl { public: - virtual ~polymorphic_oarchive(){}; + ~polymorphic_oarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/boost/archive/polymorphic_text_iarchive.hpp b/boost/archive/polymorphic_text_iarchive.hpp index 3e59bfe6..790d8def 100644 --- a/boost/archive/polymorphic_text_iarchive.hpp +++ b/boost/archive/polymorphic_text_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // polymorphic_text_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -25,17 +25,17 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class BOOST_SYMBOL_VISIBLE polymorphic_text_iarchive : +class BOOST_SYMBOL_VISIBLE polymorphic_text_iarchive : public detail::polymorphic_iarchive_route { public: polymorphic_text_iarchive(std::istream & is, unsigned int flags = 0) : detail::polymorphic_iarchive_route(is, flags) {} - ~polymorphic_text_iarchive(){} + ~polymorphic_text_iarchive() BOOST_OVERRIDE {} }; } // namespace archive @@ -51,4 +51,3 @@ BOOST_SERIALIZATION_REGISTER_ARCHIVE( ) #endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_IARCHIVE_HPP - diff --git a/boost/archive/polymorphic_text_oarchive.hpp b/boost/archive/polymorphic_text_oarchive.hpp index 233d37c7..82b3ed78 100644 --- a/boost/archive/polymorphic_text_oarchive.hpp +++ b/boost/archive/polymorphic_text_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // polymorphic_text_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -20,7 +20,7 @@ #include #include -namespace boost { +namespace boost { namespace archive { class BOOST_SYMBOL_VISIBLE polymorphic_text_oarchive : @@ -30,7 +30,7 @@ public: polymorphic_text_oarchive(std::ostream & os, unsigned int flags = 0) : detail::polymorphic_oarchive_route(os, flags) {} - ~polymorphic_text_oarchive(){} + ~polymorphic_text_oarchive() BOOST_OVERRIDE {} }; } // namespace archive @@ -42,4 +42,3 @@ BOOST_SERIALIZATION_REGISTER_ARCHIVE( ) #endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_OARCHIVE_HPP - diff --git a/boost/archive/polymorphic_text_wiarchive.hpp b/boost/archive/polymorphic_text_wiarchive.hpp index 96afe0eb..b32d5334 100644 --- a/boost/archive/polymorphic_text_wiarchive.hpp +++ b/boost/archive/polymorphic_text_wiarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // polymorphic_text_wiarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -29,17 +29,17 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class BOOST_SYMBOL_VISIBLE polymorphic_text_wiarchive : +class BOOST_SYMBOL_VISIBLE polymorphic_text_wiarchive : public detail::polymorphic_iarchive_route { public: polymorphic_text_wiarchive(std::wistream & is, unsigned int flags = 0) : detail::polymorphic_iarchive_route(is, flags) {} - ~polymorphic_text_wiarchive(){} + ~polymorphic_text_wiarchive() BOOST_OVERRIDE {} }; } // namespace archive @@ -56,4 +56,3 @@ BOOST_SERIALIZATION_REGISTER_ARCHIVE( #endif // BOOST_NO_STD_WSTREAMBUF #endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_WIARCHIVE_HPP - diff --git a/boost/archive/polymorphic_text_woarchive.hpp b/boost/archive/polymorphic_text_woarchive.hpp index fa0a3aec..4e0f5ea4 100644 --- a/boost/archive/polymorphic_text_woarchive.hpp +++ b/boost/archive/polymorphic_text_woarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // polymorphic_text_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -24,7 +24,7 @@ #include #include -namespace boost { +namespace boost { namespace archive { class BOOST_SYMBOL_VISIBLE polymorphic_text_woarchive : @@ -34,7 +34,7 @@ public: polymorphic_text_woarchive(std::wostream & os, unsigned int flags = 0) : detail::polymorphic_oarchive_route(os, flags) {} - ~polymorphic_text_woarchive(){} + ~polymorphic_text_woarchive() BOOST_OVERRIDE {} }; } // namespace archive @@ -45,6 +45,5 @@ BOOST_SERIALIZATION_REGISTER_ARCHIVE( boost::archive::polymorphic_text_woarchive ) -#endif // BOOST_NO_STD_WSTREAMBUF +#endif // BOOST_NO_STD_WSTREAMBUF #endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_WOARCHIVE_HPP - diff --git a/boost/archive/polymorphic_xml_iarchive.hpp b/boost/archive/polymorphic_xml_iarchive.hpp index 0b17b551..f8ddaf96 100644 --- a/boost/archive/polymorphic_xml_iarchive.hpp +++ b/boost/archive/polymorphic_xml_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // polymorphic_xml_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -25,17 +25,17 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class BOOST_SYMBOL_VISIBLE polymorphic_xml_iarchive : +class BOOST_SYMBOL_VISIBLE polymorphic_xml_iarchive : public detail::polymorphic_iarchive_route { public: polymorphic_xml_iarchive(std::istream & is, unsigned int flags = 0) : detail::polymorphic_iarchive_route(is, flags) {} - ~polymorphic_xml_iarchive(){} + ~polymorphic_xml_iarchive() BOOST_OVERRIDE {} }; } // namespace archive @@ -51,4 +51,3 @@ BOOST_SERIALIZATION_REGISTER_ARCHIVE( ) #endif // BOOST_ARCHIVE_POLYMORPHIC_XML_IARCHIVE_HPP - diff --git a/boost/archive/polymorphic_xml_oarchive.hpp b/boost/archive/polymorphic_xml_oarchive.hpp index a9fc8242..08324e50 100644 --- a/boost/archive/polymorphic_xml_oarchive.hpp +++ b/boost/archive/polymorphic_xml_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // polymorphic_xml_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -20,7 +20,7 @@ #include #include -namespace boost { +namespace boost { namespace archive { class BOOST_SYMBOL_VISIBLE polymorphic_xml_oarchive : @@ -30,7 +30,7 @@ public: polymorphic_xml_oarchive(std::ostream & os, unsigned int flags = 0) : detail::polymorphic_oarchive_route(os, flags) {} - ~polymorphic_xml_oarchive(){} + ~polymorphic_xml_oarchive() BOOST_OVERRIDE {} }; } // namespace archive } // namespace boost @@ -41,4 +41,3 @@ BOOST_SERIALIZATION_REGISTER_ARCHIVE( ) #endif // BOOST_ARCHIVE_POLYMORPHIC_XML_OARCHIVE_HPP - diff --git a/boost/archive/polymorphic_xml_wiarchive.hpp b/boost/archive/polymorphic_xml_wiarchive.hpp index 688ff4d0..5b325329 100644 --- a/boost/archive/polymorphic_xml_wiarchive.hpp +++ b/boost/archive/polymorphic_xml_wiarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // polymorphic_xml_wiarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -24,17 +24,17 @@ #include #include -namespace boost { +namespace boost { namespace archive { -class BOOST_SYMBOL_VISIBLE polymorphic_xml_wiarchive : +class BOOST_SYMBOL_VISIBLE polymorphic_xml_wiarchive : public detail::polymorphic_iarchive_route { public: polymorphic_xml_wiarchive(std::wistream & is, unsigned int flags = 0) : detail::polymorphic_iarchive_route(is, flags) {} - ~polymorphic_xml_wiarchive(){} + ~polymorphic_xml_wiarchive() BOOST_OVERRIDE {} }; } // namespace archive @@ -45,6 +45,5 @@ BOOST_SERIALIZATION_REGISTER_ARCHIVE( boost::archive::polymorphic_xml_wiarchive ) -#endif // BOOST_NO_STD_WSTREAMBUF +#endif // BOOST_NO_STD_WSTREAMBUF #endif // BOOST_ARCHIVE_POLYMORPHIC_XML_WIARCHIVE_HPP - diff --git a/boost/archive/polymorphic_xml_woarchive.hpp b/boost/archive/polymorphic_xml_woarchive.hpp index 2606010d..f7a3349f 100644 --- a/boost/archive/polymorphic_xml_woarchive.hpp +++ b/boost/archive/polymorphic_xml_woarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // polymorphic_xml_woarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -24,7 +24,7 @@ #include #include -namespace boost { +namespace boost { namespace archive { class BOOST_SYMBOL_VISIBLE polymorphic_xml_woarchive : @@ -34,7 +34,7 @@ public: polymorphic_xml_woarchive(std::wostream & os, unsigned int flags = 0) : detail::polymorphic_oarchive_route(os, flags) {} - ~polymorphic_xml_woarchive(){} + ~polymorphic_xml_woarchive() BOOST_OVERRIDE {} }; } // namespace archive @@ -47,4 +47,3 @@ BOOST_SERIALIZATION_REGISTER_ARCHIVE( #endif // BOOST_NO_STD_WSTREAMBUF #endif // BOOST_ARCHIVE_POLYMORPHIC_XML_WOARCHIVE_HPP - diff --git a/boost/archive/text_iarchive.hpp b/boost/archive/text_iarchive.hpp index d9d60adf..73fc39f5 100644 --- a/boost/archive/text_iarchive.hpp +++ b/boost/archive/text_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // text_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -32,7 +32,7 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { namespace detail { @@ -65,16 +65,16 @@ protected: load(v); t = boost::serialization::item_version_type(v); } - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void load(char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void load(wchar_t * t); #endif - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void load(std::wstring &ws); #endif template @@ -85,11 +85,11 @@ protected: load_override(class_name_type & t); BOOST_ARCHIVE_DECL void init(); - BOOST_ARCHIVE_DECL + BOOST_ARCHIVE_DECL text_iarchive_impl(std::istream & is, unsigned int flags); // don't import inline definitions! leave this as a reminder. - //BOOST_ARCHIVE_DECL - ~text_iarchive_impl(){}; + //BOOST_ARCHIVE_DECL + ~text_iarchive_impl() BOOST_OVERRIDE {} }; } // namespace archive @@ -106,17 +106,20 @@ protected: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class BOOST_SYMBOL_VISIBLE text_iarchive : +class BOOST_SYMBOL_VISIBLE text_iarchive : public text_iarchive_impl{ public: text_iarchive(std::istream & is_, unsigned int flags = 0) : // note: added _ to suppress useless gcc warning text_iarchive_impl(is_, flags) - {} - ~text_iarchive(){} + { + if(0 == (flags & no_header)) + init(); + } + ~text_iarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/boost/archive/text_oarchive.hpp b/boost/archive/text_oarchive.hpp index e4c6d466..f94f876d 100644 --- a/boost/archive/text_oarchive.hpp +++ b/boost/archive/text_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // text_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -21,8 +21,8 @@ #include #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif @@ -39,7 +39,7 @@ namespace std{ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { namespace detail { @@ -70,40 +70,43 @@ protected: void save(const boost::serialization::item_version_type & t){ save(static_cast(t)); } - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void save(const wchar_t * t); #endif - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void save(const std::wstring &ws); #endif - BOOST_ARCHIVE_DECL + BOOST_ARCHIVE_DECL text_oarchive_impl(std::ostream & os, unsigned int flags); // don't import inline definitions! leave this as a reminder. - //BOOST_ARCHIVE_DECL - ~text_oarchive_impl(){}; + //BOOST_ARCHIVE_DECL + ~text_oarchive_impl() BOOST_OVERRIDE {} public: - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void save_binary(const void *address, std::size_t count); }; // do not derive from this class. If you want to extend this functionality -// via inhertance, derived from text_oarchive_impl instead. This will +// via inheritance, derived from text_oarchive_impl instead. This will // preserve correct static polymorphism. -class BOOST_SYMBOL_VISIBLE text_oarchive : +class BOOST_SYMBOL_VISIBLE text_oarchive : public text_oarchive_impl { public: text_oarchive(std::ostream & os_, unsigned int flags = 0) : // note: added _ to suppress useless gcc warning text_oarchive_impl(os_, flags) - {} - ~text_oarchive(){} + { + if(0 == (flags & no_header)) + init(); + } + ~text_oarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/boost/archive/text_wiarchive.hpp b/boost/archive/text_wiarchive.hpp index 3adf068a..5daf52f5 100644 --- a/boost/archive/text_wiarchive.hpp +++ b/boost/archive/text_wiarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // text_wiarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -36,7 +36,7 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { namespace detail { @@ -92,9 +92,9 @@ protected: void load_override(T & t){ basic_text_iarchive::load_override(t); } - BOOST_WARCHIVE_DECL + BOOST_WARCHIVE_DECL text_wiarchive_impl(std::wistream & is, unsigned int flags); - ~text_wiarchive_impl(){}; + ~text_wiarchive_impl() BOOST_OVERRIDE {} }; } // namespace archive @@ -111,16 +111,19 @@ protected: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class BOOST_SYMBOL_VISIBLE text_wiarchive : +class BOOST_SYMBOL_VISIBLE text_wiarchive : public text_wiarchive_impl{ public: text_wiarchive(std::wistream & is, unsigned int flags = 0) : text_wiarchive_impl(is, flags) - {} - ~text_wiarchive(){} + { + if(0 == (flags & no_header)) + init(); + } + ~text_wiarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/boost/archive/text_woarchive.hpp b/boost/archive/text_woarchive.hpp index beba62f7..713d89fc 100644 --- a/boost/archive/text_woarchive.hpp +++ b/boost/archive/text_woarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // text_woarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -26,8 +26,8 @@ #include // size_t #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif @@ -44,7 +44,7 @@ namespace std{ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { namespace detail { @@ -97,14 +97,11 @@ protected: #endif text_woarchive_impl(std::wostream & os, unsigned int flags) : basic_text_oprimitive( - os, + os, 0 != (flags & no_codecvt) ), basic_text_oarchive(flags) - { - if(0 == (flags & no_header)) - basic_text_oarchive::init(); - } + {} public: void save_binary(const void *address, std::size_t count){ put(static_cast('\n')); @@ -114,7 +111,7 @@ public: #else this->basic_text_oprimitive::save_binary( #endif - address, + address, count ); put(static_cast('\n')); @@ -127,16 +124,19 @@ public: // typedef text_oarchive_impl > text_oarchive; // do not derive from this class. If you want to extend this functionality -// via inhertance, derived from text_oarchive_impl instead. This will +// via inheritance, derived from text_oarchive_impl instead. This will // preserve correct static polymorphism. -class BOOST_SYMBOL_VISIBLE text_woarchive : +class BOOST_SYMBOL_VISIBLE text_woarchive : public text_woarchive_impl { public: text_woarchive(std::wostream & os, unsigned int flags = 0) : text_woarchive_impl(os, flags) - {} - ~text_woarchive(){} + { + if(0 == (flags & no_header)) + init(); + } + ~text_woarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/boost/archive/wcslen.hpp b/boost/archive/wcslen.hpp index 0b60004f..6138c3e4 100644 --- a/boost/archive/wcslen.hpp +++ b/boost/archive/wcslen.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // wcslen.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -19,8 +19,8 @@ #include // size_t #include #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif @@ -30,7 +30,7 @@ namespace std{ // wcslen #if defined(BOOST_DINKUMWARE_STDLIB) && BOOST_DINKUMWARE_STDLIB < 306 \ -|| defined(__LIBCOMO__) +|| defined(__LIBCOMO__) namespace std { inline std::size_t wcslen(const wchar_t * ws) diff --git a/boost/archive/xml_archive_exception.hpp b/boost/archive/xml_archive_exception.hpp index 82c53ef5..1852d428 100644 --- a/boost/archive/xml_archive_exception.hpp +++ b/boost/archive/xml_archive_exception.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_archive_exception.hpp: -// (C) Copyright 2007 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2007 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include @@ -31,7 +31,7 @@ namespace archive { ////////////////////////////////////////////////////////////////////// // exceptions thrown by xml archives // -class BOOST_SYMBOL_VISIBLE xml_archive_exception : +class BOOST_SYMBOL_VISIBLE xml_archive_exception : public virtual boost::archive::archive_exception { public: @@ -41,12 +41,12 @@ public: xml_archive_tag_name_error } exception_code; BOOST_ARCHIVE_DECL xml_archive_exception( - exception_code c, + exception_code c, const char * e1 = NULL, const char * e2 = NULL ); - BOOST_ARCHIVE_DECL xml_archive_exception(xml_archive_exception const &) ; - virtual BOOST_ARCHIVE_DECL ~xml_archive_exception() BOOST_NOEXCEPT_OR_NOTHROW ; + BOOST_ARCHIVE_DECL xml_archive_exception(xml_archive_exception const &); + BOOST_ARCHIVE_DECL ~xml_archive_exception() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE; }; }// namespace archive diff --git a/boost/archive/xml_iarchive.hpp b/boost/archive/xml_iarchive.hpp index abd2f9fc..2d04edcb 100644 --- a/boost/archive/xml_iarchive.hpp +++ b/boost/archive/xml_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -32,7 +32,7 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { namespace detail { @@ -44,7 +44,7 @@ class basic_xml_grammar; typedef basic_xml_grammar xml_grammar; template -class BOOST_SYMBOL_VISIBLE xml_iarchive_impl : +class BOOST_SYMBOL_VISIBLE xml_iarchive_impl : public basic_text_iprimitive, public basic_xml_iarchive { @@ -66,13 +66,13 @@ protected: void load(T & t){ basic_text_iprimitive::load(t); } - void + void load(version_type & t){ unsigned int v; load(v); t = version_type(v); } - void + void load(boost::serialization::item_version_type & t){ unsigned int v; load(v); @@ -98,10 +98,10 @@ protected: load_override(class_name_type & t); BOOST_ARCHIVE_DECL void init(); - BOOST_ARCHIVE_DECL + BOOST_ARCHIVE_DECL xml_iarchive_impl(std::istream & is, unsigned int flags); BOOST_ARCHIVE_DECL - ~xml_iarchive_impl(); + ~xml_iarchive_impl() BOOST_OVERRIDE; }; } // namespace archive @@ -117,16 +117,19 @@ protected: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class BOOST_SYMBOL_VISIBLE xml_iarchive : +class BOOST_SYMBOL_VISIBLE xml_iarchive : public xml_iarchive_impl{ public: xml_iarchive(std::istream & is, unsigned int flags = 0) : xml_iarchive_impl(is, flags) - {} - ~xml_iarchive(){}; + { + if(0 == (flags & no_header)) + init(); + } + ~xml_iarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/boost/archive/xml_oarchive.hpp b/boost/archive/xml_oarchive.hpp index d0fa8b21..84871b2d 100644 --- a/boost/archive/xml_oarchive.hpp +++ b/boost/archive/xml_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -21,8 +21,8 @@ #include // size_t #include #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif @@ -47,7 +47,7 @@ namespace detail { } // namespace detail template -class BOOST_SYMBOL_VISIBLE xml_oarchive_impl : +class BOOST_SYMBOL_VISIBLE xml_oarchive_impl : public basic_text_oprimitive, public basic_xml_oarchive { @@ -63,15 +63,15 @@ protected: void save(const T & t){ basic_text_oprimitive::save(t); } - void + void save(const version_type & t){ save(static_cast(t)); } - void + void save(const boost::serialization::item_version_type & t){ save(static_cast(t)); } - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T BOOST_ARCHIVE_DECL void @@ -83,10 +83,10 @@ protected: BOOST_ARCHIVE_DECL void save(const std::wstring &ws); #endif - BOOST_ARCHIVE_DECL + BOOST_ARCHIVE_DECL xml_oarchive_impl(std::ostream & os, unsigned int flags); - BOOST_ARCHIVE_DECL - ~xml_oarchive_impl(); + BOOST_ARCHIVE_DECL + ~xml_oarchive_impl() BOOST_OVERRIDE; public: BOOST_ARCHIVE_DECL void save_binary(const void *address, std::size_t count); @@ -105,23 +105,26 @@ public: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { // we use the following because we can't use // typedef xml_oarchive_impl > xml_oarchive; // do not derive from this class. If you want to extend this functionality -// via inhertance, derived from xml_oarchive_impl instead. This will +// via inheritance, derived from xml_oarchive_impl instead. This will // preserve correct static polymorphism. -class BOOST_SYMBOL_VISIBLE xml_oarchive : +class BOOST_SYMBOL_VISIBLE xml_oarchive : public xml_oarchive_impl { public: xml_oarchive(std::ostream & os, unsigned int flags = 0) : xml_oarchive_impl(os, flags) - {} - ~xml_oarchive(){} + { + if(0 == (flags & no_header)) + init(); + } + ~xml_oarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/boost/archive/xml_wiarchive.hpp b/boost/archive/xml_wiarchive.hpp index 2ca3e559..e496621c 100644 --- a/boost/archive/xml_wiarchive.hpp +++ b/boost/archive/xml_wiarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_wiarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -29,7 +29,6 @@ #include #include #include -// #include #include // must be the last header @@ -50,7 +49,7 @@ class basic_xml_grammar; typedef basic_xml_grammar xml_wgrammar; template -class BOOST_SYMBOL_VISIBLE xml_wiarchive_impl : +class BOOST_SYMBOL_VISIBLE xml_wiarchive_impl : public basic_text_iprimitive, public basic_xml_iarchive { @@ -68,17 +67,17 @@ protected: return is; } template - void + void load(T & t){ basic_text_iprimitive::load(t); } - void + void load(version_type & t){ unsigned int v; load(v); t = version_type(v); } - void + void load(boost::serialization::item_version_type & t){ unsigned int v; load(v); @@ -102,19 +101,19 @@ protected: } BOOST_WARCHIVE_DECL void load_override(class_name_type & t); - BOOST_WARCHIVE_DECL void + BOOST_WARCHIVE_DECL void init(); - BOOST_WARCHIVE_DECL - xml_wiarchive_impl(std::wistream & is, unsigned int flags) ; - BOOST_WARCHIVE_DECL - ~xml_wiarchive_impl(); + BOOST_WARCHIVE_DECL + xml_wiarchive_impl(std::wistream & is, unsigned int flags); + BOOST_WARCHIVE_DECL + ~xml_wiarchive_impl() BOOST_OVERRIDE; }; } // namespace archive } // namespace boost #ifdef BOOST_MSVC -# pragma warning(pop) +# pragma warning(pop) #endif #include // pops abi_suffix.hpp pragmas @@ -124,7 +123,7 @@ protected: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { class BOOST_SYMBOL_VISIBLE xml_wiarchive : @@ -132,8 +131,11 @@ class BOOST_SYMBOL_VISIBLE xml_wiarchive : public: xml_wiarchive(std::wistream & is, unsigned int flags = 0) : xml_wiarchive_impl(is, flags) - {} - ~xml_wiarchive(){} + { + if(0 == (flags & no_header)) + init(); + } + ~xml_wiarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/boost/archive/xml_woarchive.hpp b/boost/archive/xml_woarchive.hpp index e6ac50de..9f4a4c8e 100644 --- a/boost/archive/xml_woarchive.hpp +++ b/boost/archive/xml_woarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_woarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -22,20 +22,18 @@ #else #include // size_t #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif #include -//#include #include #include #include #include #include -//#include #include // must be the last header @@ -76,26 +74,26 @@ protected: save(const version_type & t){ save(static_cast(t)); } - void + void save(const boost::serialization::item_version_type & t){ save(static_cast(t)); } BOOST_WARCHIVE_DECL void save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_WARCHIVE_DECL void + BOOST_WARCHIVE_DECL void save(const wchar_t * t); #endif - BOOST_WARCHIVE_DECL void + BOOST_WARCHIVE_DECL void save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING BOOST_WARCHIVE_DECL void save(const std::wstring &ws); #endif - BOOST_WARCHIVE_DECL + BOOST_WARCHIVE_DECL xml_woarchive_impl(std::wostream & os, unsigned int flags); BOOST_WARCHIVE_DECL - ~xml_woarchive_impl(); + ~xml_woarchive_impl() BOOST_OVERRIDE; public: BOOST_WARCHIVE_DECL void save_binary(const void *address, std::size_t count); @@ -106,7 +104,7 @@ public: // typedef xml_woarchive_impl > xml_woarchive; // do not derive from this class. If you want to extend this functionality -// via inhertance, derived from xml_woarchive_impl instead. This will +// via inheritance, derived from xml_woarchive_impl instead. This will // preserve correct static polymorphism. class BOOST_SYMBOL_VISIBLE xml_woarchive : public xml_woarchive_impl @@ -114,8 +112,11 @@ class BOOST_SYMBOL_VISIBLE xml_woarchive : public: xml_woarchive(std::wostream & os, unsigned int flags = 0) : xml_woarchive_impl(os, flags) - {} - ~xml_woarchive(){} + { + if(0 == (flags & no_header)) + init(); + } + ~xml_woarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/boost/array.hpp b/boost/array.hpp index 99dc2c6d..a32d1e99 100644 --- a/boost/array.hpp +++ b/boost/array.hpp @@ -41,13 +41,12 @@ #endif #include +#include #include #include #include #include -// Handles broken standard libraries better than -#include #include #include diff --git a/boost/asio.hpp b/boost/asio.hpp index 1ee7e12f..282fc4c1 100644 --- a/boost/asio.hpp +++ b/boost/asio.hpp @@ -2,7 +2,7 @@ // asio.hpp // ~~~~~~~~ // -// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -17,14 +17,21 @@ # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) +#include +#include #include #include +#include +#include #include #include #include #include +#include #include +#include #include +#include #include #include #include @@ -32,11 +39,16 @@ #include #include #include +#include #include #include #include +#include +#include +#include #include #include +#include #include #include #include @@ -44,19 +56,53 @@ #include #include #include +#include +#include +#include #include #include #include #include +#include #include #include #include +#include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include #include #include #include @@ -94,6 +140,8 @@ #include #include #include +#include +#include #include #include #include @@ -101,6 +149,7 @@ #include #include #include +#include #include #include #include @@ -109,16 +158,27 @@ #include #include #include +#include +#include +#include +#include #include #include #include +#include +#include #include +#include +#include +#include #include #include #include #include +#include #include #include +#include #include #include #include @@ -140,6 +200,7 @@ #include #include #include +#include #include #include diff --git a/boost/asio/any_io_executor.hpp b/boost/asio/any_io_executor.hpp new file mode 100644 index 00000000..6dc8731f --- /dev/null +++ b/boost/asio/any_io_executor.hpp @@ -0,0 +1,305 @@ +// +// any_io_executor.hpp +// ~~~~~~~~~~~~~~~~~~~ +// +// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef BOOST_ASIO_ANY_IO_EXECUTOR_HPP +#define BOOST_ASIO_ANY_IO_EXECUTOR_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) + +#include +#if defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) +# include +#else // defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) +# include +# include +#endif // defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) + +#include + +namespace boost { +namespace asio { + +#if defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) + +typedef executor any_io_executor; + +#else // defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) + +/// Polymorphic executor type for use with I/O objects. +/** + * The @c any_io_executor type is a polymorphic executor that supports the set + * of properties required by I/O objects. It is defined as the + * execution::any_executor class template parameterised as follows: + * @code execution::any_executor< + * execution::context_as_t, + * execution::blocking_t::never_t, + * execution::prefer_only, + * execution::prefer_only, + * execution::prefer_only, + * execution::prefer_only, + * execution::prefer_only + * > @endcode + */ +class any_io_executor : +#if defined(GENERATING_DOCUMENTATION) + public execution::any_executor<...> +#else // defined(GENERATING_DOCUMENTATION) + public execution::any_executor< + execution::context_as_t, + execution::blocking_t::never_t, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only + > +#endif // defined(GENERATING_DOCUMENTATION) +{ +public: +#if !defined(GENERATING_DOCUMENTATION) + typedef execution::any_executor< + execution::context_as_t, + execution::blocking_t::never_t, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only + > base_type; + + typedef void supportable_properties_type( + execution::context_as_t, + execution::blocking_t::never_t, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only + ); +#endif // !defined(GENERATING_DOCUMENTATION) + + /// Default constructor. + BOOST_ASIO_DECL any_io_executor() BOOST_ASIO_NOEXCEPT; + + /// Construct in an empty state. Equivalent effects to default constructor. + BOOST_ASIO_DECL any_io_executor(nullptr_t) BOOST_ASIO_NOEXCEPT; + + /// Copy constructor. + BOOST_ASIO_DECL any_io_executor(const any_io_executor& e) BOOST_ASIO_NOEXCEPT; + +#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) + /// Move constructor. + BOOST_ASIO_DECL any_io_executor(any_io_executor&& e) BOOST_ASIO_NOEXCEPT; +#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) + + /// Construct to point to the same target as another any_executor. +#if defined(GENERATING_DOCUMENTATION) + template + any_io_executor(execution::any_executor e); +#else // defined(GENERATING_DOCUMENTATION) + template + any_io_executor(OtherAnyExecutor e, + typename constraint< + conditional< + !is_same::value + && is_base_of::value, + typename execution::detail::supportable_properties< + 0, supportable_properties_type>::template + is_valid_target, + false_type + >::type::value + >::type = 0) + : base_type(BOOST_ASIO_MOVE_CAST(OtherAnyExecutor)(e)) + { + } +#endif // defined(GENERATING_DOCUMENTATION) + + /// Construct a polymorphic wrapper for the specified executor. +#if defined(GENERATING_DOCUMENTATION) + template + any_io_executor(Executor e); +#else // defined(GENERATING_DOCUMENTATION) + template + any_io_executor(Executor e, + typename constraint< + conditional< + !is_same::value + && !is_base_of::value, + execution::detail::is_valid_target_executor< + Executor, supportable_properties_type>, + false_type + >::type::value + >::type = 0) + : base_type(BOOST_ASIO_MOVE_CAST(Executor)(e)) + { + } +#endif // defined(GENERATING_DOCUMENTATION) + + /// Assignment operator. + BOOST_ASIO_DECL any_io_executor& operator=( + const any_io_executor& e) BOOST_ASIO_NOEXCEPT; + +#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) + /// Move assignment operator. + BOOST_ASIO_DECL any_io_executor& operator=( + any_io_executor&& e) BOOST_ASIO_NOEXCEPT; +#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) + + /// Assignment operator that sets the polymorphic wrapper to the empty state. + BOOST_ASIO_DECL any_io_executor& operator=(nullptr_t); + + /// Destructor. + BOOST_ASIO_DECL ~any_io_executor(); + + /// Swap targets with another polymorphic wrapper. + BOOST_ASIO_DECL void swap(any_io_executor& other) BOOST_ASIO_NOEXCEPT; + + /// Obtain a polymorphic wrapper with the specified property. + /** + * Do not call this function directly. It is intended for use with the + * boost::asio::require and boost::asio::prefer customisation points. + * + * For example: + * @code any_io_executor ex = ...; + * auto ex2 = boost::asio::require(ex, execution::blocking.possibly); @endcode + */ + template + any_io_executor require(const Property& p, + typename constraint< + traits::require_member::is_valid + >::type = 0) const + { + return static_cast(*this).require(p); + } + + /// Obtain a polymorphic wrapper with the specified property. + /** + * Do not call this function directly. It is intended for use with the + * boost::asio::prefer customisation point. + * + * For example: + * @code any_io_executor ex = ...; + * auto ex2 = boost::asio::prefer(ex, execution::blocking.possibly); @endcode + */ + template + any_io_executor prefer(const Property& p, + typename constraint< + traits::prefer_member::is_valid + >::type = 0) const + { + return static_cast(*this).prefer(p); + } +}; + +#if !defined(GENERATING_DOCUMENTATION) + +template <> +BOOST_ASIO_DECL any_io_executor any_io_executor::require( + const execution::blocking_t::never_t&, int) const; + +template <> +BOOST_ASIO_DECL any_io_executor any_io_executor::prefer( + const execution::blocking_t::possibly_t&, int) const; + +template <> +BOOST_ASIO_DECL any_io_executor any_io_executor::prefer( + const execution::outstanding_work_t::tracked_t&, int) const; + +template <> +BOOST_ASIO_DECL any_io_executor any_io_executor::prefer( + const execution::outstanding_work_t::untracked_t&, int) const; + +template <> +BOOST_ASIO_DECL any_io_executor any_io_executor::prefer( + const execution::relationship_t::fork_t&, int) const; + +template <> +BOOST_ASIO_DECL any_io_executor any_io_executor::prefer( + const execution::relationship_t::continuation_t&, int) const; + +namespace traits { + +#if !defined(BOOST_ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT) + +template <> +struct equality_comparable +{ + static const bool is_valid = true; + static const bool is_noexcept = true; +}; + +#endif // !defined(BOOST_ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT) + +#if !defined(BOOST_ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT) + +template +struct execute_member +{ + static const bool is_valid = true; + static const bool is_noexcept = false; + typedef void result_type; +}; + +#endif // !defined(BOOST_ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT) + +#if !defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + +template +struct query_member : + query_member +{ +}; + +#endif // !defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + +#if !defined(BOOST_ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT) + +template +struct require_member : + require_member +{ + typedef any_io_executor result_type; +}; + +#endif // !defined(BOOST_ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT) + +#if !defined(BOOST_ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT) + +template +struct prefer_member : + prefer_member +{ + typedef any_io_executor result_type; +}; + +#endif // !defined(BOOST_ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT) + +} // namespace traits + +#endif // !defined(GENERATING_DOCUMENTATION) + +#endif // defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) + +} // namespace asio +} // namespace boost + +#include + +#if defined(BOOST_ASIO_HEADER_ONLY) \ + && !defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) +# include +#endif // defined(BOOST_ASIO_HEADER_ONLY) + // && !defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) + +#endif // BOOST_ASIO_ANY_IO_EXECUTOR_HPP diff --git a/boost/asio/append.hpp b/boost/asio/append.hpp new file mode 100644 index 00000000..0963236f --- /dev/null +++ b/boost/asio/append.hpp @@ -0,0 +1,80 @@ +// +// append.hpp +// ~~~~~~~~~~ +// +// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef BOOST_ASIO_APPEND_HPP +#define BOOST_ASIO_APPEND_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) + +#include + +#if (defined(BOOST_ASIO_HAS_STD_TUPLE) \ + && defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)) \ + || defined(GENERATING_DOCUMENTATION) + +#include +#include + +#include + +namespace boost { +namespace asio { + +/// Completion token type used to specify that the completion handler +/// arguments should be passed additional values after the results of the +/// operation. +template +class append_t +{ +public: + /// Constructor. + template + BOOST_ASIO_CONSTEXPR explicit append_t( + BOOST_ASIO_MOVE_ARG(T) completion_token, + BOOST_ASIO_MOVE_ARG(V)... values) + : token_(BOOST_ASIO_MOVE_CAST(T)(completion_token)), + values_(BOOST_ASIO_MOVE_CAST(V)(values)...) + { + } + +//private: + CompletionToken token_; + std::tuple values_; +}; + +/// Completion token type used to specify that the completion handler +/// arguments should be passed additional values after the results of the +/// operation. +template +BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONSTEXPR append_t< + typename decay::type, typename decay::type...> +append(BOOST_ASIO_MOVE_ARG(CompletionToken) completion_token, + BOOST_ASIO_MOVE_ARG(Values)... values) +{ + return append_t< + typename decay::type, typename decay::type...>( + BOOST_ASIO_MOVE_CAST(CompletionToken)(completion_token), + BOOST_ASIO_MOVE_CAST(Values)(values)...); +} + +} // namespace asio +} // namespace boost + +#include + +#include + +#endif // (defined(BOOST_ASIO_HAS_STD_TUPLE) + // && defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)) + // || defined(GENERATING_DOCUMENTATION) + +#endif // BOOST_ASIO_APPEND_HPP diff --git a/boost/asio/as_tuple.hpp b/boost/asio/as_tuple.hpp new file mode 100644 index 00000000..613fe1ad --- /dev/null +++ b/boost/asio/as_tuple.hpp @@ -0,0 +1,141 @@ +// +// as_tuple.hpp +// ~~~~~~~~~~~~ +// +// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef BOOST_ASIO_AS_TUPLE_HPP +#define BOOST_ASIO_AS_TUPLE_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) + +#include + +#if (defined(BOOST_ASIO_HAS_STD_TUPLE) \ + && defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)) \ + || defined(GENERATING_DOCUMENTATION) + +#include + +#include + +namespace boost { +namespace asio { + +/// A @ref completion_token adapter used to specify that the completion handler +/// arguments should be combined into a single tuple argument. +/** + * The as_tuple_t class is used to indicate that any arguments to the + * completion handler should be combined and passed as a single tuple argument. + * The arguments are first moved into a @c std::tuple and that tuple is then + * passed to the completion handler. + */ +template +class as_tuple_t +{ +public: + /// Tag type used to prevent the "default" constructor from being used for + /// conversions. + struct default_constructor_tag {}; + + /// Default constructor. + /** + * This constructor is only valid if the underlying completion token is + * default constructible and move constructible. The underlying completion + * token is itself defaulted as an argument to allow it to capture a source + * location. + */ + BOOST_ASIO_CONSTEXPR as_tuple_t( + default_constructor_tag = default_constructor_tag(), + CompletionToken token = CompletionToken()) + : token_(BOOST_ASIO_MOVE_CAST(CompletionToken)(token)) + { + } + + /// Constructor. + template + BOOST_ASIO_CONSTEXPR explicit as_tuple_t( + BOOST_ASIO_MOVE_ARG(T) completion_token) + : token_(BOOST_ASIO_MOVE_CAST(T)(completion_token)) + { + } + + /// Adapts an executor to add the @c as_tuple_t completion token as the + /// default. + template + struct executor_with_default : InnerExecutor + { + /// Specify @c as_tuple_t as the default completion token type. + typedef as_tuple_t default_completion_token_type; + + /// Construct the adapted executor from the inner executor type. + template + executor_with_default(const InnerExecutor1& ex, + typename constraint< + conditional< + !is_same::value, + is_convertible, + false_type + >::type::value + >::type = 0) BOOST_ASIO_NOEXCEPT + : InnerExecutor(ex) + { + } + }; + + /// Type alias to adapt an I/O object to use @c as_tuple_t as its + /// default completion token type. +#if defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES) \ + || defined(GENERATING_DOCUMENTATION) + template + using as_default_on_t = typename T::template rebind_executor< + executor_with_default >::other; +#endif // defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES) + // || defined(GENERATING_DOCUMENTATION) + + /// Function helper to adapt an I/O object to use @c as_tuple_t as its + /// default completion token type. + template + static typename decay::type::template rebind_executor< + executor_with_default::type::executor_type> + >::other + as_default_on(BOOST_ASIO_MOVE_ARG(T) object) + { + return typename decay::type::template rebind_executor< + executor_with_default::type::executor_type> + >::other(BOOST_ASIO_MOVE_CAST(T)(object)); + } + +//private: + CompletionToken token_; +}; + +/// Adapt a @ref completion_token to specify that the completion handler +/// arguments should be combined into a single tuple argument. +template +BOOST_ASIO_NODISCARD inline +BOOST_ASIO_CONSTEXPR as_tuple_t::type> +as_tuple(BOOST_ASIO_MOVE_ARG(CompletionToken) completion_token) +{ + return as_tuple_t::type>( + BOOST_ASIO_MOVE_CAST(CompletionToken)(completion_token)); +} + +} // namespace asio +} // namespace boost + +#include + +#include + +#endif // (defined(BOOST_ASIO_HAS_STD_TUPLE) + // && defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)) + // || defined(GENERATING_DOCUMENTATION) + +#endif // BOOST_ASIO_AS_TUPLE_HPP diff --git a/boost/asio/associated_allocator.hpp b/boost/asio/associated_allocator.hpp index c70852b5..01c02026 100644 --- a/boost/asio/associated_allocator.hpp +++ b/boost/asio/associated_allocator.hpp @@ -2,7 +2,7 @@ // associated_allocator.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -17,21 +17,33 @@ #include #include +#include +#include #include #include namespace boost { namespace asio { + +template +struct associated_allocator; + namespace detail { -template -struct associated_allocator_check +template +struct has_allocator_type : false_type { - typedef void type; }; -template +template +struct has_allocator_type::type> + : true_type +{ +}; + +template struct associated_allocator_impl { typedef E type; @@ -44,7 +56,7 @@ struct associated_allocator_impl template struct associated_allocator_impl::type> + typename void_type::type> { typedef typename T::allocator_type type; @@ -54,6 +66,17 @@ struct associated_allocator_impl +struct associated_allocator_impl::value + >::type, + typename void_type< + typename associator::type + >::type> : associator +{ +}; + } // namespace detail /// Traits type used to obtain the allocator associated with an object. @@ -100,7 +123,7 @@ struct associated_allocator * @returns associated_allocator::get(t) */ template -inline typename associated_allocator::type +BOOST_ASIO_NODISCARD inline typename associated_allocator::type get_associated_allocator(const T& t) BOOST_ASIO_NOEXCEPT { return associated_allocator::get(t); @@ -111,7 +134,7 @@ get_associated_allocator(const T& t) BOOST_ASIO_NOEXCEPT * @returns associated_allocator::get(t, a) */ template -inline typename associated_allocator::type +BOOST_ASIO_NODISCARD inline typename associated_allocator::type get_associated_allocator(const T& t, const Allocator& a) BOOST_ASIO_NOEXCEPT { return associated_allocator::get(t, a); @@ -125,6 +148,29 @@ using associated_allocator_t #endif // defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES) +#if defined(BOOST_ASIO_HAS_STD_REFERENCE_WRAPPER) \ + || defined(GENERATING_DOCUMENTATION) + +/// Specialisation of associated_allocator for @c std::reference_wrapper. +template +struct associated_allocator, Allocator> +{ + /// Forwards @c type to the associator specialisation for the unwrapped type + /// @c T. + typedef typename associated_allocator::type type; + + /// Forwards the request to get the allocator to the associator specialisation + /// for the unwrapped type @c T. + static type get(reference_wrapper t, + const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT + { + return associated_allocator::get(t.get(), a); + } +}; + +#endif // defined(BOOST_ASIO_HAS_STD_REFERENCE_WRAPPER) + // || defined(GENERATING_DOCUMENTATION) + } // namespace asio } // namespace boost diff --git a/boost/asio/associated_cancellation_slot.hpp b/boost/asio/associated_cancellation_slot.hpp new file mode 100644 index 00000000..f3f52e73 --- /dev/null +++ b/boost/asio/associated_cancellation_slot.hpp @@ -0,0 +1,180 @@ +// +// associated_cancellation_slot.hpp +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// +// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef BOOST_ASIO_ASSOCIATED_CANCELLATION_SLOT_HPP +#define BOOST_ASIO_ASSOCIATED_CANCELLATION_SLOT_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) + +#include +#include +#include +#include + +#include + +namespace boost { +namespace asio { + +template +struct associated_cancellation_slot; + +namespace detail { + +template +struct has_cancellation_slot_type : false_type +{ +}; + +template +struct has_cancellation_slot_type::type> + : true_type +{ +}; + +template +struct associated_cancellation_slot_impl +{ + typedef void asio_associated_cancellation_slot_is_unspecialised; + + typedef S type; + + static type get(const T&, const S& s = S()) BOOST_ASIO_NOEXCEPT + { + return s; + } +}; + +template +struct associated_cancellation_slot_impl::type> +{ + typedef typename T::cancellation_slot_type type; + + static type get(const T& t, const S& = S()) BOOST_ASIO_NOEXCEPT + { + return t.get_cancellation_slot(); + } +}; + +template +struct associated_cancellation_slot_impl::value + >::type, + typename void_type< + typename associator::type + >::type> : associator +{ +}; + +} // namespace detail + +/// Traits type used to obtain the cancellation_slot associated with an object. +/** + * A program may specialise this traits type if the @c T template parameter in + * the specialisation is a user-defined type. The template parameter @c + * CancellationSlot shall be a type meeting the CancellationSlot requirements. + * + * Specialisations shall meet the following requirements, where @c t is a const + * reference to an object of type @c T, and @c s is an object of type @c + * CancellationSlot. + * + * @li Provide a nested typedef @c type that identifies a type meeting the + * CancellationSlot requirements. + * + * @li Provide a noexcept static member function named @c get, callable as @c + * get(t) and with return type @c type. + * + * @li Provide a noexcept static member function named @c get, callable as @c + * get(t,s) and with return type @c type. + */ +template +struct associated_cancellation_slot +#if !defined(GENERATING_DOCUMENTATION) + : detail::associated_cancellation_slot_impl +#endif // !defined(GENERATING_DOCUMENTATION) +{ +#if defined(GENERATING_DOCUMENTATION) + /// If @c T has a nested type @c cancellation_slot_type, + /// T::cancellation_slot_type. Otherwise + /// @c CancellationSlot. + typedef see_below type; + + /// If @c T has a nested type @c cancellation_slot_type, returns + /// t.get_cancellation_slot(). Otherwise returns @c s. + static type get(const T& t, + const CancellationSlot& s = CancellationSlot()) BOOST_ASIO_NOEXCEPT; +#endif // defined(GENERATING_DOCUMENTATION) +}; + +/// Helper function to obtain an object's associated cancellation_slot. +/** + * @returns associated_cancellation_slot::get(t) + */ +template +BOOST_ASIO_NODISCARD inline typename associated_cancellation_slot::type +get_associated_cancellation_slot(const T& t) BOOST_ASIO_NOEXCEPT +{ + return associated_cancellation_slot::get(t); +} + +/// Helper function to obtain an object's associated cancellation_slot. +/** + * @returns associated_cancellation_slot::get(t, st) + */ +template +BOOST_ASIO_NODISCARD inline +typename associated_cancellation_slot::type +get_associated_cancellation_slot(const T& t, + const CancellationSlot& st) BOOST_ASIO_NOEXCEPT +{ + return associated_cancellation_slot::get(t, st); +} + +#if defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES) + +template +using associated_cancellation_slot_t = + typename associated_cancellation_slot::type; + +#endif // defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES) + +namespace detail { + +template +struct associated_cancellation_slot_forwarding_base +{ +}; + +template +struct associated_cancellation_slot_forwarding_base::asio_associated_cancellation_slot_is_unspecialised, + void + >::value + >::type> +{ + typedef void asio_associated_cancellation_slot_is_unspecialised; +}; + +} // namespace detail +} // namespace asio +} // namespace boost + +#include + +#endif // BOOST_ASIO_ASSOCIATED_CANCELLATION_SLOT_HPP diff --git a/boost/asio/associated_executor.hpp b/boost/asio/associated_executor.hpp index a44190b5..02738aac 100644 --- a/boost/asio/associated_executor.hpp +++ b/boost/asio/associated_executor.hpp @@ -2,7 +2,7 @@ // associated_executor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -16,7 +16,10 @@ #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include +#include +#include #include +#include #include #include @@ -24,20 +27,32 @@ namespace boost { namespace asio { + +template +struct associated_executor; + namespace detail { -template -struct associated_executor_check +template +struct has_executor_type : false_type { - typedef void type; }; -template +template +struct has_executor_type::type> + : true_type +{ +}; + +template struct associated_executor_impl { + typedef void asio_associated_executor_is_unspecialised; + typedef E type; - static type get(const T&, const E& e) BOOST_ASIO_NOEXCEPT + static type get(const T&, const E& e = E()) BOOST_ASIO_NOEXCEPT { return e; } @@ -45,16 +60,27 @@ struct associated_executor_impl template struct associated_executor_impl::type> + typename void_type::type> { typedef typename T::executor_type type; - static type get(const T& t, const E&) BOOST_ASIO_NOEXCEPT + static type get(const T& t, const E& = E()) BOOST_ASIO_NOEXCEPT { return t.get_executor(); } }; +template +struct associated_executor_impl::value + >::type, + typename void_type< + typename associator::type + >::type> : associator +{ +}; + } // namespace detail /// Traits type used to obtain the executor associated with an object. @@ -78,22 +104,20 @@ struct associated_executor_impl struct associated_executor +#if !defined(GENERATING_DOCUMENTATION) + : detail::associated_executor_impl +#endif // !defined(GENERATING_DOCUMENTATION) { +#if defined(GENERATING_DOCUMENTATION) /// If @c T has a nested type @c executor_type, T::executor_type. /// Otherwise @c Executor. -#if defined(GENERATING_DOCUMENTATION) typedef see_below type; -#else // defined(GENERATING_DOCUMENTATION) - typedef typename detail::associated_executor_impl::type type; -#endif // defined(GENERATING_DOCUMENTATION) /// If @c T has a nested type @c executor_type, returns /// t.get_executor(). Otherwise returns @c ex. static type get(const T& t, - const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT - { - return detail::associated_executor_impl::get(t, ex); - } + const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT; +#endif // defined(GENERATING_DOCUMENTATION) }; /// Helper function to obtain an object's associated executor. @@ -101,7 +125,7 @@ struct associated_executor * @returns associated_executor::get(t) */ template -inline typename associated_executor::type +BOOST_ASIO_NODISCARD inline typename associated_executor::type get_associated_executor(const T& t) BOOST_ASIO_NOEXCEPT { return associated_executor::get(t); @@ -112,10 +136,11 @@ get_associated_executor(const T& t) BOOST_ASIO_NOEXCEPT * @returns associated_executor::get(t, ex) */ template -inline typename associated_executor::type +BOOST_ASIO_NODISCARD inline typename associated_executor::type get_associated_executor(const T& t, const Executor& ex, - typename enable_if::value>::type* = 0) BOOST_ASIO_NOEXCEPT + typename constraint< + is_executor::value || execution::is_executor::value + >::type = 0) BOOST_ASIO_NOEXCEPT { return associated_executor::get(t, ex); } @@ -126,11 +151,11 @@ get_associated_executor(const T& t, const Executor& ex, * ExecutionContext::executor_type>::get(t, ctx.get_executor()) */ template -inline typename associated_executor::type get_associated_executor(const T& t, ExecutionContext& ctx, - typename enable_if::value>::type* = 0) BOOST_ASIO_NOEXCEPT + typename constraint::value>::type = 0) BOOST_ASIO_NOEXCEPT { return associated_executor::get(t, ctx.get_executor()); @@ -143,6 +168,54 @@ using associated_executor_t = typename associated_executor::type; #endif // defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES) +namespace detail { + +template +struct associated_executor_forwarding_base +{ +}; + +template +struct associated_executor_forwarding_base::asio_associated_executor_is_unspecialised, + void + >::value + >::type> +{ + typedef void asio_associated_executor_is_unspecialised; +}; + +} // namespace detail + +#if defined(BOOST_ASIO_HAS_STD_REFERENCE_WRAPPER) \ + || defined(GENERATING_DOCUMENTATION) + +/// Specialisation of associated_executor for @c std::reference_wrapper. +template +struct associated_executor, Executor> +#if !defined(GENERATING_DOCUMENTATION) + : detail::associated_executor_forwarding_base +#endif // !defined(GENERATING_DOCUMENTATION) +{ + /// Forwards @c type to the associator specialisation for the unwrapped type + /// @c T. + typedef typename associated_executor::type type; + + /// Forwards the request to get the executor to the associator specialisation + /// for the unwrapped type @c T. + static type get(reference_wrapper t, + const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT + { + return associated_executor::get(t.get(), ex); + } +}; + +#endif // defined(BOOST_ASIO_HAS_STD_REFERENCE_WRAPPER) + // || defined(GENERATING_DOCUMENTATION) + } // namespace asio } // namespace boost diff --git a/boost/asio/associator.hpp b/boost/asio/associator.hpp new file mode 100644 index 00000000..bc775b01 --- /dev/null +++ b/boost/asio/associator.hpp @@ -0,0 +1,37 @@ +// +// associator.hpp +// ~~~~~~~~~~~~~~ +// +// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef BOOST_ASIO_ASSOCIATOR_HPP +#define BOOST_ASIO_ASSOCIATOR_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) + +#include + +#include + +namespace boost { +namespace asio { + +/// Used to generically specialise associators for a type. +template