First public contribution.
1 #ifndef BOOST_ARCHIVE_CODECVT_NULL_HPP
2 #define BOOST_ARCHIVE_CODECVT_NULL_HPP
4 // MS compatible compilers support #pragma once
5 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
12 // (C) Copyright 2004 Robert Ramey - http://www.rrsd.com .
13 // Use, modification and distribution is subject to the Boost Software
14 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
15 // http://www.boost.org/LICENSE_1_0.txt)
17 // See http://www.boost.org for updates, documentation, and revision history.
22 #include <boost/config.hpp>
25 #if defined(__LIBCOMO__)
27 #elif defined(__QNXNTO__)
29 #elif defined(BOOST_DINKUMWARE_STDLIB) && BOOST_DINKUMWARE_STDLIB == 1
31 #elif defined(__SGI_STL_PORT)
32 #elif defined(BOOST_NO_STDC_NAMESPACE)
45 class codecvt_null<char> : public std::codecvt<char, char, std::mbstate_t>
47 virtual bool do_always_noconv() const throw() {
51 explicit codecvt_null(std::size_t no_locale_manage = 0) :
52 std::codecvt<char, char, std::mbstate_t>(no_locale_manage)
57 class codecvt_null<wchar_t> : public std::codecvt<wchar_t, char, std::mbstate_t>
59 virtual std::codecvt_base::result
61 std::mbstate_t & state,
62 const wchar_t * first1,
63 const wchar_t * last1,
64 const wchar_t * & next1,
69 virtual std::codecvt_base::result
71 std::mbstate_t & state,
79 virtual int do_encoding( ) const throw( ){
80 return sizeof(wchar_t) / sizeof(char);
82 virtual int do_max_length( ) const throw( ){
87 } // namespace archive
90 #endif //BOOST_ARCHIVE_CODECVT_NULL_HPP