adjustment to export codecvt_null<wchar_t>

This commit is contained in:
Robert Ramey
2017-06-14 15:25:49 -07:00
parent 81b44504c5
commit eaf85795f3
6 changed files with 18 additions and 8 deletions

View File

@@ -18,8 +18,11 @@
#include <locale>
#include <cstddef> // NULL, size_t
#ifndef BOOST_NO_CWCHAR
#include <cwchar> // for mbstate_t
#endif
#include <boost/config.hpp>
#include <boost/serialization/force_include.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
@@ -62,7 +65,7 @@ public:
template<>
class BOOST_SYMBOL_VISIBLE codecvt_null<wchar_t> : public std::codecvt<wchar_t, char, std::mbstate_t>
{
virtual BOOST_WARCHIVE_DECL std::codecvt_base::result
virtual BOOST_WARCHIVE_DECL BOOST_DLLEXPORT std::codecvt_base::result
do_out(
std::mbstate_t & state,
const wchar_t * first1,
@@ -71,8 +74,8 @@ class BOOST_SYMBOL_VISIBLE codecvt_null<wchar_t> : public std::codecvt<wchar_t,
char * first2,
char * last2,
char * & next2
) const;
virtual BOOST_WARCHIVE_DECL std::codecvt_base::result
) const BOOST_USED;
virtual BOOST_WARCHIVE_DECL BOOST_DLLEXPORT std::codecvt_base::result
do_in(
std::mbstate_t & state,
const char * first1,
@@ -81,7 +84,7 @@ class BOOST_SYMBOL_VISIBLE codecvt_null<wchar_t> : public std::codecvt<wchar_t,
wchar_t * first2,
wchar_t * last2,
wchar_t * & next2
) const;
) const BOOST_USED;
virtual int do_encoding( ) const throw( ){
return sizeof(wchar_t) / sizeof(char);
}
@@ -89,7 +92,7 @@ class BOOST_SYMBOL_VISIBLE codecvt_null<wchar_t> : public std::codecvt<wchar_t,
return do_encoding();
}
public:
explicit codecvt_null(std::size_t no_locale_manage = 0) :
BOOST_DLLEXPORT explicit codecvt_null(std::size_t no_locale_manage = 0) :
std::codecvt<wchar_t, char, std::mbstate_t>(no_locale_manage)
{}
virtual ~codecvt_null(){};

View File

@@ -17,7 +17,9 @@
#include <cstring> // strlen
#include <cstdlib> // mbtowc
#ifndef BOOST_NO_CWCHAR
#include <cwchar> // wcslen
#endif
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)

View File

@@ -18,8 +18,9 @@
#include <boost/assert.hpp>
#include <cstddef> // size_t
#ifndef BOOST_NO_CWCHAR
#include <cwchar> // mbstate_t
#endif
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{

View File

@@ -19,7 +19,9 @@
#include <boost/assert.hpp>
#include <cctype>
#include <cstddef> // size_t
#ifndef BOOST_NO_CWCHAR
#include <cwchar> // mbstate_t
#endif
#include <algorithm> // copy
#include <boost/config.hpp>

View File

@@ -44,7 +44,9 @@ inline std::size_t wcslen(const wchar_t * ws)
#else
#ifndef BOOST_NO_CWCHAR
#include <cwchar>
#endif
#ifdef BOOST_NO_STDC_NAMESPACE
namespace std{ using ::wcslen; }
#endif