[857] | 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_IOS_HPP_INCLUDED
|
---|
| 8 | #define BOOST_IOSTREAMS_DETAIL_IOS_HPP_INCLUDED
|
---|
| 9 |
|
---|
| 10 | #if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
---|
| 11 | # pragma once
|
---|
| 12 | #endif
|
---|
| 13 |
|
---|
| 14 | #include <boost/config.hpp> // BOOST_MSVC.
|
---|
| 15 | #include <boost/detail/workaround.hpp>
|
---|
| 16 | #include <boost/iostreams/detail/config/wide_streams.hpp>
|
---|
| 17 | #ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
|
---|
| 18 | # if !BOOST_WORKAROUND(__MWERKS__, <= 0x3003)
|
---|
| 19 | # include <ios>
|
---|
| 20 | # else
|
---|
| 21 | # include <istream>
|
---|
| 22 | # include <ostream>
|
---|
| 23 | # endif
|
---|
| 24 | #else
|
---|
| 25 | # include <exception>
|
---|
| 26 | # include <iosfwd>
|
---|
| 27 | #endif
|
---|
| 28 |
|
---|
| 29 | namespace boost { namespace iostreams { namespace detail {
|
---|
| 30 |
|
---|
| 31 | #ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------------------//
|
---|
| 32 | # define BOOST_IOSTREAMS_BASIC_IOS(ch, tr) std::basic_ios< ch, tr >
|
---|
| 33 | # if !BOOST_WORKAROUND(__MWERKS__, <= 0x3003) && \
|
---|
| 34 | !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
|
---|
| 35 | !BOOST_WORKAROUND(BOOST_MSVC, < 1300) \
|
---|
| 36 | /**/
|
---|
| 37 |
|
---|
| 38 | #define BOOST_IOS std::ios
|
---|
| 39 | #define BOOST_IOSTREAMS_FAILURE std::ios::failure
|
---|
| 40 |
|
---|
| 41 | # else
|
---|
| 42 |
|
---|
| 43 | #define BOOST_IOS std::ios_base
|
---|
| 44 | #define BOOST_IOSTREAMS_FAILURE std::ios_base::failure
|
---|
| 45 |
|
---|
| 46 | # endif
|
---|
| 47 | #else // #ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //-----------------------//
|
---|
| 48 |
|
---|
| 49 | #define BOOST_IOS std::ios
|
---|
| 50 | #define BOOST_IOSTREAMS_BASIC_IOS(ch, tr) std::ios
|
---|
| 51 | #define BOOST_IOSTREAMS_FAILURE boost::iostreams::detail::failure
|
---|
| 52 |
|
---|
| 53 | class failure : std::exception {
|
---|
| 54 | public:
|
---|
| 55 | explicit failure(const std::string& what_arg) : what_(what_arg) { }
|
---|
| 56 | const char* what() const { return what_.c_str(); }
|
---|
| 57 | private:
|
---|
| 58 | std::string what_;
|
---|
| 59 | };
|
---|
| 60 |
|
---|
| 61 | #endif // #ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //----------------------//
|
---|
| 62 |
|
---|
| 63 | } } } // End namespace failure, iostreams, boost.
|
---|
| 64 |
|
---|
| 65 | #endif // #ifndef BOOST_IOSTREAMS_DETAIL_IOS_HPP_INCLUDED
|
---|