1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/iostreams/detail/ios.hpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,65 @@
1.4 +// (C) Copyright Jonathan Turkanis 2003.
1.5 +// Distributed under the Boost Software License, Version 1.0. (See accompanying
1.6 +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
1.7 +
1.8 +// See http://www.boost.org/libs/iostreams for documentation.
1.9 +
1.10 +#ifndef BOOST_IOSTREAMS_DETAIL_IOS_HPP_INCLUDED
1.11 +#define BOOST_IOSTREAMS_DETAIL_IOS_HPP_INCLUDED
1.12 +
1.13 +#if defined(_MSC_VER) && (_MSC_VER >= 1020)
1.14 +# pragma once
1.15 +#endif
1.16 +
1.17 +#include <boost/config.hpp> // BOOST_MSVC.
1.18 +#include <boost/detail/workaround.hpp>
1.19 +#include <boost/iostreams/detail/config/wide_streams.hpp>
1.20 +#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
1.21 +# if !BOOST_WORKAROUND(__MWERKS__, <= 0x3003)
1.22 +# include <ios>
1.23 +# else
1.24 +# include <istream>
1.25 +# include <ostream>
1.26 +# endif
1.27 +#else
1.28 +# include <exception>
1.29 +# include <iosfwd>
1.30 +#endif
1.31 +
1.32 +namespace boost { namespace iostreams { namespace detail {
1.33 +
1.34 +#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------------------//
1.35 +# define BOOST_IOSTREAMS_BASIC_IOS(ch, tr) std::basic_ios< ch, tr >
1.36 +# if !BOOST_WORKAROUND(__MWERKS__, <= 0x3003) && \
1.37 + !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
1.38 + !BOOST_WORKAROUND(BOOST_MSVC, < 1300) \
1.39 + /**/
1.40 +
1.41 +#define BOOST_IOS std::ios
1.42 +#define BOOST_IOSTREAMS_FAILURE std::ios::failure
1.43 +
1.44 +# else
1.45 +
1.46 +#define BOOST_IOS std::ios_base
1.47 +#define BOOST_IOSTREAMS_FAILURE std::ios_base::failure
1.48 +
1.49 +# endif
1.50 +#else // #ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //-----------------------//
1.51 +
1.52 +#define BOOST_IOS std::ios
1.53 +#define BOOST_IOSTREAMS_BASIC_IOS(ch, tr) std::ios
1.54 +#define BOOST_IOSTREAMS_FAILURE boost::iostreams::detail::failure
1.55 +
1.56 +class failure : std::exception {
1.57 +public:
1.58 + explicit failure(const std::string& what_arg) : what_(what_arg) { }
1.59 + const char* what() const { return what_.c_str(); }
1.60 +private:
1.61 + std::string what_;
1.62 +};
1.63 +
1.64 +#endif // #ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //----------------------//
1.65 +
1.66 +} } } // End namespace failure, iostreams, boost.
1.67 +
1.68 +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_IOS_HPP_INCLUDED