source: NonGTP/Boost/boost/iostreams/detail/config/codecvt.hpp @ 857

Revision 857, 2.3 KB checked in by igarcia, 19 years ago (diff)
Line 
1// (C) Copyright Jonathan Turkanis 2003.
2// Distributed under the Boost Software License, Version 1.0. (See accompanying
3// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
4
5// See http://www.boost.org/libs/iostreams for documentation.
6
7#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED
8#define BOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED
9
10#include <boost/config.hpp>
11#include <boost/detail/workaround.hpp>
12#include <boost/iostreams/detail/config/wide_streams.hpp>
13#include <cstddef>
14
15#if defined(_MSC_VER) && (_MSC_VER >= 1020)
16# pragma once
17#endif       
18
19//------------------Support for codecvt with user-defined state types---------//
20
21#if defined(__MSL_CPP__) || defined(__LIBCOMO__) || \
22    BOOST_WORKAROUND(_STLPORT_VERSION, <= 0x450) \
23    /**/
24# define BOOST_IOSTREAMS_NO_PRIMARY_CODECVT_DEFINITION
25#endif
26
27#if defined(__GLIBCPP__) || defined(__GLIBCXX__) || \
28    BOOST_WORKAROUND(_STLPORT_VERSION, > 0x450) \
29    /**/
30# define BOOST_IOSTREAMS_EMPTY_PRIMARY_CODECVT_DEFINITION
31#endif
32
33//------------------Check for codecvt ctor taking a reference count-----------//
34
35#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) || \
36    BOOST_WORKAROUND(_STLPORT_VERSION, < 0x461) \
37    /**/
38# define BOOST_IOSTREAMS_NO_CODECVT_CTOR_FROM_SIZE_T
39#endif
40
41//------------------Normalize codecvt::length---------------------------------//
42
43#if !defined(__MSL_CPP__) && !defined(__LIBCOMO__)
44# define BOOST_IOSTREAMS_CODECVT_CV_QUALIFIER const
45#else
46# define BOOST_IOSTREAMS_CODECVT_CV_QUALIFIER
47#endif
48
49//------------------Check for codecvt::max_length-----------------------------//
50
51#if BOOST_WORKAROUND(_STLPORT_VERSION, < 0x461)
52# define BOOST_IOSTREAMS_NO_CODECVT_MAX_LENGTH
53#endif
54                   
55//------------------Put mbstate_t and codecvt in std--------------------------//
56
57#ifndef BOOST_IOSTREAMS_NO_LOCALE
58# include <locale>
59#endif
60
61// From Robert Ramey's version of utf8_codecvt_facet.
62namespace std {
63
64#if defined(__LIBCOMO__)
65    using ::mbstate_t;
66#elif defined(BOOST_DINKUMWARE_STDLIB)
67    using ::mbstate_t;
68#elif defined(__SGI_STL_PORT)
69#elif defined(BOOST_NO_STDC_NAMESPACE)
70    using ::codecvt;
71    using ::mbstate_t;
72#endif
73
74} // End namespace std.
75
76#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED
Note: See TracBrowser for help on using the repository browser.