Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86609 - in trunk/libs/serialization: src test
From: ramey_at_[hidden]
Date: 2013-11-10 20:55:39


Author: ramey
Date: 2013-11-10 20:55:39 EST (Sun, 10 Nov 2013)
New Revision: 86609
URL: http://svn.boost.org/trac/boost/changeset/86609

Log:
changed codecvt_utf8 so that serialization uses the standard one if available. If there is no standard one available, it uses the one in boost/utility.

Text files modified:
   trunk/libs/serialization/src/basic_archive.cpp | 2 +-
   trunk/libs/serialization/src/utf8_codecvt_facet.cpp | 21 ++++++++++-----------
   trunk/libs/serialization/test/test_tools.hpp | 8 ++++----
   trunk/libs/serialization/test/test_utf8_codecvt.cpp | 10 +++++++++-
   4 files changed, 24 insertions(+), 17 deletions(-)

Modified: trunk/libs/serialization/src/basic_archive.cpp
==============================================================================
--- trunk/libs/serialization/src/basic_archive.cpp Sun Nov 10 18:26:21 2013 (r86608)
+++ trunk/libs/serialization/src/basic_archive.cpp 2013-11-10 20:55:39 EST (Sun, 10 Nov 2013) (r86609)
@@ -74,7 +74,7 @@
 
 BOOST_ARCHIVE_DECL(library_version_type)
 BOOST_ARCHIVE_VERSION(){
- return library_version_type(10);
+ return library_version_type(11);
 }
 
 } // namespace archive

Modified: trunk/libs/serialization/src/utf8_codecvt_facet.cpp
==============================================================================
--- trunk/libs/serialization/src/utf8_codecvt_facet.cpp Sun Nov 10 18:26:21 2013 (r86608)
+++ trunk/libs/serialization/src/utf8_codecvt_facet.cpp 2013-11-10 20:55:39 EST (Sun, 10 Nov 2013) (r86609)
@@ -7,15 +7,14 @@
 #ifdef BOOST_NO_STD_WSTREAMBUF
 #error "wide char i/o not supported on this platform"
 #else
-
-#define BOOST_UTF8_BEGIN_NAMESPACE \
- namespace boost { namespace archive { namespace detail {
-#define BOOST_UTF8_DECL
-#define BOOST_UTF8_END_NAMESPACE }}}
-#include <boost/detail/utf8_codecvt_facet.ipp>
-#undef BOOST_UTF8_END_NAMESPACE
-#undef BOOST_UTF8_DECL
-#undef BOOST_UTF8_BEGIN_NAMESPACE
-
+ #ifdef BOOST_NO_CXX11_HDR_CODECVT
+ #define BOOST_UTF8_BEGIN_NAMESPACE \
+ namespace boost { namespace archive { namespace detail {
+ #define BOOST_UTF8_DECL
+ #define BOOST_UTF8_END_NAMESPACE }}}
+ #include <boost/detail/utf8_codecvt_facet.ipp>
+ #undef BOOST_UTF8_END_NAMESPACE
+ #undef BOOST_UTF8_DECL
+ #undef BOOST_UTF8_BEGIN_NAMESPACE
+ #endif // BOOST_NO_CXX11_HDR_CODECVT
 #endif // BOOST_NO_STD_WSTREAMBUF
-

Modified: trunk/libs/serialization/test/test_tools.hpp
==============================================================================
--- trunk/libs/serialization/test/test_tools.hpp Sun Nov 10 18:26:21 2013 (r86608)
+++ trunk/libs/serialization/test/test_tools.hpp 2013-11-10 20:55:39 EST (Sun, 10 Nov 2013) (r86609)
@@ -1,14 +1,14 @@
 #ifndef BOOST_SERIALIZATION_TEST_TOOLS_HPP
 #define BOOST_SERIALIZATION_TEST_TOOLS_HPP
 
-#define BOOST_FILESYSTEM_VERSION 3
-#include <boost/filesystem.hpp>
-
 // MS compatible compilers support #pragma once
 #if defined(_MSC_VER)
 # pragma once
 #endif
 
+#define BOOST_FILESYSTEM_VERSION 3
+#include <boost/filesystem/operations.hpp> // unique_path
+
 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
 // test_tools.hpp
 //
@@ -20,10 +20,10 @@
 // See http://www.boost.org for updates, documentation, and revision history.
 
 #include <cstddef> // size_t
+#include <boost/config.hpp>
 #ifndef BOOST_NO_EXCEPTION_STD_NAMESPACE
     #include <exception>
 #endif
-#include <boost/config.hpp>
 #include <boost/detail/no_exceptions_support.hpp>
 
 #if defined(UNDER_CE)

Modified: trunk/libs/serialization/test/test_utf8_codecvt.cpp
==============================================================================
--- trunk/libs/serialization/test/test_utf8_codecvt.cpp Sun Nov 10 18:26:21 2013 (r86608)
+++ trunk/libs/serialization/test/test_utf8_codecvt.cpp 2013-11-10 20:55:39 EST (Sun, 10 Nov 2013) (r86609)
@@ -42,7 +42,15 @@
 #include "test_tools.hpp"
 
 #include <boost/archive/add_facet.hpp>
-#include <boost/archive/detail/utf8_codecvt_facet.hpp>
+
+#ifndef BOOST_NO_CXX11_HDR_CODECVT
+ #include <codecvt>
+ namespace boost { namespace archive { namespace detail {
+ typedef std::codecvt_utf8 utf8_codecvt_facet;
+ } } }
+#else
+ #include <boost/archive/detail/utf8_codecvt_facet.hpp>
+#endif
 
 template<std::size_t s>
 struct test_data


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk