File indexing completed on 2025-01-18 09:38:50
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_IOSTREAMS_DETAIL_IOS_HPP_INCLUDED
0009 #define BOOST_IOSTREAMS_DETAIL_IOS_HPP_INCLUDED
0010
0011 #if defined(_MSC_VER)
0012 # pragma once
0013 #endif
0014
0015 #include <boost/config.hpp> // BOOST_MSVC.
0016 #include <boost/detail/workaround.hpp>
0017 #include <boost/iostreams/detail/config/wide_streams.hpp>
0018 #ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
0019 # if !BOOST_WORKAROUND(__MWERKS__, <= 0x3003)
0020 # include <ios>
0021 # else
0022 # include <istream>
0023 # include <ostream>
0024 # endif
0025 #else
0026 # include <exception>
0027 # include <iosfwd>
0028 #endif
0029
0030 namespace boost { namespace iostreams { namespace detail {
0031
0032 #ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
0033 # define BOOST_IOSTREAMS_BASIC_IOS(ch, tr) std::basic_ios< ch, tr >
0034 # if !BOOST_WORKAROUND(__MWERKS__, <= 0x3003) && \
0035 !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) \
0036
0037
0038 #define BOOST_IOS std::ios
0039 #define BOOST_IOSTREAMS_FAILURE std::ios::failure
0040
0041 # else
0042
0043 #define BOOST_IOS std::ios_base
0044 #define BOOST_IOSTREAMS_FAILURE std::ios_base::failure
0045
0046 # endif
0047 #else
0048
0049 #define BOOST_IOS std::ios
0050 #define BOOST_IOSTREAMS_BASIC_IOS(ch, tr) std::ios
0051 #define BOOST_IOSTREAMS_FAILURE boost::iostreams::detail::failure
0052
0053 class failure : std::exception {
0054 public:
0055 explicit failure(const std::string& what_arg) : what_(what_arg) { }
0056 const char* what() const { return what_.c_str(); }
0057 private:
0058 std::string what_;
0059 };
0060
0061 #endif
0062
0063 } } }
0064
0065 #endif