Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/iostreams/doc/macros/workarounds.html @ 29

Last change on this file since 29 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 9.4 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4    <TITLE>Broken Compiler Workarounds</TITLE>
5    <LINK REL="stylesheet" HREF="../../../../boost.css">
6    <LINK REL="stylesheet" HREF="../theme/iostreams.css">
7</HEAD>
8<STYLE> 
9    DT A { /*text-decoration:none*/ } 
10    LI A { /*text-decoration:none;*/ font: 80% Verdana, Tahoma, Arial, Helvetica, sans-serif }
11</STYLE>
12<BODY>
13
14<!-- Begin Banner -->
15
16    <H1 CLASS="title">Broken Compiler Workarounds</H1>
17    <HR CLASS="banner">
18
19<!-- End Banner -->
20
21<DL class="page-index">
22  <DT><A href="#overview">Overview</A></DT>
23  <DT><A href="#reference">Reference</A>
24    <DL class="page-index">
25      <DT><A href="#ios">1. Standard header <CODE>&lt;ios&gt;</CODE></A></DT>
26      <DT><A href="#streams">2. Templated Streams</A></DT>
27      <DT><A href="#streambufs">3. Templated Stream Buffers</A></DT>
28      <DT><A href="#streambufs">4. Character Traits</A></DT>
29      <DT><A href="#component_access">5. Chain Component Access</A></DT>
30    </DL>
31  </DT>
32</DL>
33
34<HR>
35
36<A NAME="overview"></A>
37<H2>Overview</H2>
38
39<P>
40    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.
41</P>
42
43<A NAME="reference"></A>
44<H2>Reference</H2>
45
46<A NAME="ios"></A>
47<H3>1. Standard header <CODE>&lt;ios&gt;</CODE></H3>
48
49<A NAME="ios_headers"></A>
50<H3>Headers</H3>
51
52<DL class="page-index">
53  <DT><A CLASS="header" HREF="../../../../boost/iostreams/detail/ios.hpp"><CODE>&lt;boost/iostreams/detail/ios.hpp&gt;</CODE></A></DT>
54</DL>
55
56<A NAME="ios_synopsis"></A>
57<H3>Synopsis</H3>
58
59<PRE CLASS='broken_ie'><SPAN CLASS='preprocessor'>#define</SPAN> <A CLASS='documented' HREF="#boost_iostreams_basic_ios">BOOST_IOSTREAMS_BASIC_IOS</A>(ch, tr) ...
60<SPAN CLASS='preprocessor'>#define</SPAN> <A CLASS='documented' HREF="#boost_ios">BOOST_IOS</A> ...
61<SPAN CLASS='preprocessor'>#define</SPAN> <A CLASS='documented' HREF="#boost_iostreams_failure">BOOST_IOSTREAMS_FAILURE</A> ...</PRE>
62
63<A NAME="boost_iostreams_basic_ios"></A>
64<H4><CODE>BOOST_IOSTREAMS_BASIC_IOS</CODE></H4>
65
66<P>Expands to <CODE>std::basic_ios&lt;ch, tr&gt;</CODE> for standard libraries which support templated streams, and to <CODE>std::ios</CODE> otherwise.</P>
67
68<A NAME="boost_ios"></A>
69<H4><CODE>BOOST_IOS</CODE></H4>
70
71<P>Expands to <CODE>std::ios_base</CODE> if available, and to <CODE>std::ios</CODE> otherwise. To access the nested class <CODE>std::ios_base::failure</CODE>, use <A HREF="#boost_iostreams_failure"><CODE>BOOST_IOSTREAMS_FAILURE</CODE></A>.
72
73<A NAME="boost_iostreams_failure"></A>
74<H4><CODE>BOOST_IOSTREAMS_FAILURE</CODE></H4>
75
76<P>Expands to <CODE>std::ios_base::failure</CODE> if available, and to a suitable derived class of <CODE>std::exception</CODE> otherwise.</P>
77
78<A NAME="reference"></A>
79<H2>Reference</H2>
80
81<A NAME="streams"></A>
82<H3>2. Templated Streams</H3>
83
84<A NAME="streams_headers"></A>
85<H3>Headers</H3>
86
87<DL class="page-index">
88  <DT><A CLASS="header" HREF="../../../../boost/iostreams/detail/iostream.hpp"><CODE>&lt;boost/iostreams/detail/iostream.hpp&gt;</CODE></A></DT>
89</DL>
90
91<A NAME="streams_synopsis"></A>
92<H3>Synopsis</H3>
93
94<PRE CLASS='broken_ie'><SPAN CLASS='preprocessor'>#define</SPAN> <A CLASS='documented' HREF="#boost_iostreams_basic_istream">BOOST_IOSTREAMS_BASIC_ISTREAM</A>(ch, tr) ...
95#define</SPAN> <A CLASS='documented' HREF="#boost_iostreams_basic_ostream">BOOST_IOSTREAMS_BASIC_OSTREAM</A>(ch, tr) ...
96#define</SPAN> <A CLASS='documented' HREF="#boost_iostreams_basic_iostream">BOOST_IOSTREAMS_BASIC_IOSTREAM</A>(ch, tr) ...</PRE>
97
98<A NAME="boost_iostreams_basic_istream"></A>
99<H4><CODE>BOOST_IOSTREAMS_BASIC_ISTREAM</CODE></H4>
100
101<P>Expands to <CODE>std::basic_istream&lt;ch, tr&gt;</CODE> for standard libraries which support templated streams, and to <CODE>std::istream</CODE> otherwise.</P>
102
103<A NAME="boost_iostreams_basic_ostream"></A>
104<H4><CODE>BOOST_IOSTREAMS_BASIC_OSTREAM</CODE></H4>
105
106<P>Expands to <CODE>std::basic_ostream&lt;ch, tr&gt;</CODE> for standard libraries which support templated streams, and to <CODE>std::ostream</CODE> otherwise.</P>
107
108<A NAME="boost_iostreams_basic_iostream"></A>
109<H4><CODE>BOOST_IOSTREAMS_BASIC_IOSTREAM</CODE></H4>
110
111<P>Expands to <CODE>std::basic_iostream&lt;ch, tr&gt;</CODE> for standard libraries which support templated streams, and to <CODE>std::iostream</CODE> otherwise.</P>
112
113<A NAME="streambufs"></A>
114<H3>3. Templated Stream Buffers</H3>
115
116<A NAME="streambufs_headers"></A>
117<H3>Headers</H3>
118
119<DL class="page-index">
120  <DT><A CLASS="header" HREF="../../../../boost/iostreams/detail/iostream.hpp"><CODE>&lt;boost/iostreams/detail/streambuf.hpp&gt;</CODE></A></DT>
121</DL>
122
123<A NAME="streambufs_synopsis"></A>
124<H3>Synopsis</H3>
125
126<PRE CLASS='broken_ie'><SPAN CLASS='preprocessor'>#define</SPAN> <A CLASS='documented' HREF="#boost_iostreams_basic_streambuf">BOOST_IOSTREAMS_BASIC_STREAMBUF</A>(ch, tr) ...
127#define</SPAN> <A CLASS='documented' HREF="#boost_iostreams_pubseekoff">BOOST_IOSTREAMS_PUBSEEKOFF</A> ...
128#define</SPAN> <A CLASS='documented' HREF="#boost_iostreams_pubseekpos">BOOST_IOSTREAMS_PUBSEEKPOS</A> ...
129#define</SPAN> <A CLASS='documented' HREF="#boost_iostreams_pubsync">BOOST_IOSTREAMS_PUBSYNC</A> ...</PRE>
130
131<A NAME="boost_iostreams_basic_streambuf"></A>
132<H4><CODE>BOOST_IOSTREAMS_BASIC_STREAMBUF</CODE></H4>
133
134<P>Expands to <CODE>std::basic_streambuf&lt;ch, tr&gt;</CODE> for standard libraries which support <CODE>std::basic_streambuf</CODE>, and to <CODE>std::streambuf</CODE> otherwise.</P>
135
136
137<A NAME="boost_iostreams_pubseekoff"></A>
138<H4><CODE>BOOST_IOSTREAMS_PUBSEEKOFF</CODE></H4>
139
140<P>Expands to <CODE>pubseekoff</CODE> for standard libraries which support <CODE>std::basic_streambuf::pubseekoff</CODE>, and to <CODE>seekoff</CODE> otherwise.</P>
141
142<A NAME="boost_iostreams_pubseekpos"></A>
143<H4><CODE>BOOST_IOSTREAMS_PUBSEEKPOS</CODE></H4>
144
145<P>Expands to <CODE>pubseekpos</CODE> for standard libraries which support <CODE>std::basic_streambuf::pubseekpos</CODE>, and to <CODE>seekpos</CODE> otherwise.</P>
146
147<A NAME="boost_iostreams_pubsync"></A>
148<H4><CODE>BOOST_IOSTREAMS_PUBSYNC</CODE></H4>
149
150<P>Expands to <CODE>pubsync</CODE> for standard libraries which support <CODE>std::basic_streambuf::pubsync</CODE>, and to <CODE>sync</CODE> otherwise.</P>
151
152<A NAME="char_traits"></A>
153<H3>4. Character Traits</H3>
154
155<A NAME="char_traits_headers"></A>
156<H3>Headers</H3>
157
158<DL class="page-index">
159  <DT><A CLASS="header" HREF="../../../../boost/iostreams/detail/char_traits.hpp"><CODE>&lt;boost/iostreams/detail/char_traits.hpp&gt;</CODE></A></DT>
160</DL>
161
162<A NAME="char_traits_synopsis"></A>
163<H3>Synopsis</H3>
164
165<PRE CLASS='broken_ie'><SPAN CLASS='preprocessor'>#define</SPAN> <A CLASS='documented' HREF="#boost_iostreams_char_traits">BOOST_IOSTREAMS_CHAR_TRAITS</A>(ch) ...</PRE>
166
167<A NAME="boost_iostreams_char_traits"></A>
168<H4><CODE>BOOST_IOSTREAMS_CHAR_TRAITS</CODE></H4>
169
170
171<P>Expands to <CODE>std::char_traits&lt;ch&gt;</CODE> for standard libraries which support <CODE>std::char_traits</CODE>, and to a substitute for <CODE>std::char_traits&lt;char&gt;</CODE> otherwise.</P>
172<A NAME="component_access"></A>
173<H3>5. Chain Component Access</H3>
174
175<A NAME="component_access_headers"></A>
176<H3>Headers</H3>
177
178<DL class="page-index">
179  <DT><A CLASS="header" HREF="../../../../boost/iostreams/chain.hpp"><CODE>&lt;boost/iostreams/chain.hpp&gt;</CODE></A></DT>
180</DL>
181
182<A NAME="component_access_synopsis"></A>
183<H3>Synopsis</H3>
184
185<PRE CLASS='broken_ie'><SPAN CLASS='preprocessor'>#define</SPAN> <A CLASS='documented' HREF="#boost_iostreams_component_type">BOOST_IOSTREAMS_COMPONENT_TYPE</A>(chain, n) ...
186<SPAN CLASS='preprocessor'>#define</SPAN> <A CLASS='documented' HREF="#boost_iostreams_component">BOOST_IOSTREAMS_COMPONENT</A>(chain, n, t) ...</PRE>
187
188<A NAME="boost_iostreams_component_type"></A>
189<H4><CODE>BOOST_IOSTREAMS_COMPONENT_TYPE</CODE></H4>
190
191<P>Used in place of <CODE>chain.component_type(n)</CODE> for compilers which don't support explicit specification of member function template arguments. <CODE>chain</CODE> can be an instance of <A HREF="../classes/filtering_stream.html"><CODE>filtering_stream</CODE></A>, <A HREF="../classes/filtering_streambuf.html"><CODE>filtering_streambuf</CODE></A> or <A HREF="../classes/chain.html"><CODE>basic_chain</CODE></A>.</P>
192
193<P><I>This macro is deprecated. Use <CODE>chain.component_type(n)</CODE> instead.</I></P>
194
195<A NAME="boost_iostreams_component"></A>
196<H4><CODE>BOOST_IOSTREAMS_COMPONENT</CODE></H4>
197
198<P>Used in place of <CODE>chain.component&lt;t&gt;(n)</CODE> for compilers which don't support explicit specification of member function template arguments. <CODE>chain</CODE> can be an instance of <A HREF="../classes/filtering_stream.html"><CODE>filtering_stream</CODE></A>, <A HREF="../classes/filtering_streambuf.html"><CODE>filtering_streambuf</CODE></A> or <A HREF="../classes/chain.html"><CODE>basic_chain</CODE></A>.</P>
199
200<HR STYLE="margin-top:1em">
201
202<!-- Begin Footer -->
203
204<P STYLE="margin-top:2em" CLASS="copyright">Revised
205<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
20620 May, 2004
207<!--webbot bot="Timestamp" endspan i-checksum="38504" -->
208</P>
209
210<P CLASS="copyright">&copy; Copyright <A HREF="http://www.kangaroologic.com" TARGET="_top">Jonathan Turkanis</A>, 2004. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <A HREF="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)
211</P>
212
213<!-- End Footer -->
214
215</BODY>
Note: See TracBrowser for help on using the repository browser.