Back to Arangodb

Broken Compiler Workarounds

3rdParty/boost/1.78.0/libs/iostreams/doc/macros/workarounds.html

3.12.9.15.2 KB
Original Source

Broken Compiler Workarounds

OverviewReference1. Standard header <ios>2. Templated Streams3. Templated Stream Buffers4. Character Traits5. Chain Component Access


Overview

The Boost Iostreams library contains several macros useful for writing code which works with compilers which fail to support certain core language features and with defective standard library implementations, such as those which do not provide template streams.

Reference

1. Standard header <ios>

Headers

<boost/iostreams/detail/ios.hpp>

Synopsis

#define[BOOST\_IOSTREAMS\_BASIC\_IOS](#boost_iostreams_basic_ios)(ch, tr) ...#define[BOOST\_IOS](#boost_ios)...#define[BOOST\_IOSTREAMS\_FAILURE](#boost_iostreams_failure)...

BOOST_IOSTREAMS_BASIC_IOS

Expands to std::basic_ios<ch, tr> for standard libraries which support templated streams, and to std::ios otherwise.

BOOST_IOS

Expands to std::ios_base if available, and to std::ios otherwise. To access the nested class std::ios_base::failure, use BOOST_IOSTREAMS_FAILURE.

BOOST_IOSTREAMS_FAILURE

Expands to std::ios_base::failure if available, and to a suitable derived class of std::exception otherwise.

2. Templated Streams

Headers

<boost/iostreams/detail/iostream.hpp>

Synopsis

#define[BOOST\_IOSTREAMS\_BASIC\_ISTREAM](#boost_iostreams_basic_istream)(ch, tr) ...
#define[BOOST\_IOSTREAMS\_BASIC\_OSTREAM](#boost_iostreams_basic_ostream)(ch, tr) ...
#define[BOOST\_IOSTREAMS\_BASIC\_IOSTREAM](#boost_iostreams_basic_iostream)(ch, tr) ...

BOOST_IOSTREAMS_BASIC_ISTREAM

Expands to std::basic_istream<ch, tr> for standard libraries which support templated streams, and to std::istream otherwise.

BOOST_IOSTREAMS_BASIC_OSTREAM

Expands to std::basic_ostream<ch, tr> for standard libraries which support templated streams, and to std::ostream otherwise.

BOOST_IOSTREAMS_BASIC_IOSTREAM

Expands to std::basic_iostream<ch, tr> for standard libraries which support templated streams, and to std::iostream otherwise.

3. Templated Stream Buffers

Headers

<boost/iostreams/detail/streambuf.hpp>

Synopsis

#define[BOOST\_IOSTREAMS\_BASIC\_STREAMBUF](#boost_iostreams_basic_streambuf)(ch, tr) ...
#define[BOOST\_IOSTREAMS\_PUBSEEKOFF](#boost_iostreams_pubseekoff)...
#define[BOOST\_IOSTREAMS\_PUBSEEKPOS](#boost_iostreams_pubseekpos)...
#define[BOOST\_IOSTREAMS\_PUBSYNC](#boost_iostreams_pubsync)...

BOOST_IOSTREAMS_BASIC_STREAMBUF

Expands to std::basic_streambuf<ch, tr> for standard libraries which support std::basic_streambuf, and to std::streambuf otherwise.

BOOST_IOSTREAMS_PUBSEEKOFF

Expands to pubseekoff for standard libraries which support std::basic_streambuf::pubseekoff, and to seekoff otherwise.

BOOST_IOSTREAMS_PUBSEEKPOS

Expands to pubseekpos for standard libraries which support std::basic_streambuf::pubseekpos, and to seekpos otherwise.

BOOST_IOSTREAMS_PUBSYNC

Expands to pubsync for standard libraries which support std::basic_streambuf::pubsync, and to sync otherwise.

4. Character Traits

Headers

<boost/iostreams/detail/char_traits.hpp>

Synopsis

#define[BOOST\_IOSTREAMS\_CHAR\_TRAITS](#boost_iostreams_char_traits)(ch) ...

BOOST_IOSTREAMS_CHAR_TRAITS

Expands to std::char_traits<ch> for standard libraries which support std::char_traits, and to a substitute for std::char_traits<char> otherwise.

5. Chain Component Access

Headers

<boost/iostreams/chain.hpp>

Synopsis

#define[BOOST\_IOSTREAMS\_COMPONENT\_TYPE](#boost_iostreams_component_type)(chain, n) ...#define[BOOST\_IOSTREAMS\_COMPONENT](#boost_iostreams_component)(chain, n, t) ...

BOOST_IOSTREAMS_COMPONENT_TYPE

Used in place of chain.component_type(n) for compilers which don't support explicit specification of member function template arguments. chain can be an instance of filtering_stream, filtering_streambuf or basic_chain.

This macro is deprecated. Use chain.component_type(n) instead.

BOOST_IOSTREAMS_COMPONENT

Used in place of chain.component<t>(n) for compilers which don't support explicit specification of member function template arguments. chain can be an instance of filtering_stream, filtering_streambuf or basic_chain.


© Copyright 2008 CodeRage, LLC
© Copyright 2004-2007 Jonathan Turkanis
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)