File indexing completed on 2025-01-18 09:30:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 #if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
0027
0028
0029 #ifndef BOOST_FORMAT_WORKAROUNDS_GCC295_H
0030 #define BOOST_FORMAT_WORKAROUNDS_GCC295_H
0031
0032
0033 #include <iostream>
0034 #define BOOST_FORMAT_OSTREAM_DEFINED
0035
0036 #include <streambuf.h>
0037 #define BOOST_FORMAT_STREAMBUF_DEFINED
0038
0039 #define BOOST_NO_TEMPLATE_STD_STREAM
0040
0041 #ifndef BOOST_IO_STD
0042 # define BOOST_IO_STD std::
0043 #endif
0044
0045
0046
0047
0048
0049
0050 namespace std {
0051
0052
0053
0054
0055
0056 template<class Ch>
0057 class char_traits;
0058
0059 template <class Ch, class Tr>
0060 class basic_streambuf;
0061
0062 template <class Tr>
0063 class basic_streambuf<char, Tr> : public streambuf {
0064 };
0065
0066 template <class Ch, class Tr=::std::char_traits<Ch> >
0067 class basic_ios;
0068
0069 template <class Tr>
0070 class basic_ios<char, Tr> : public ostream {
0071 public:
0072 basic_ios(streambuf * p) : ostream(p) {};
0073 char fill() const { return ios::fill(); }
0074 char fill(char c) { return ios::fill(c); }
0075 char widen(char c) { return c; }
0076 char narrow(char c, char def) { return c; }
0077 basic_ios& copyfmt(const ios& right) {
0078 fill(right.fill());
0079 flags(right.flags() );
0080 exceptions(right.exceptions());
0081 width(right.width());
0082 precision(right.precision());
0083 return *this;
0084 }
0085 };
0086
0087
0088 typedef ios ios_base;
0089
0090 template <class Ch, class Tr>
0091 class basic_ostream;
0092
0093 template <class Tr>
0094 class basic_ostream<char, Tr> : public basic_ios<char, Tr>
0095 {
0096 public:
0097 basic_ostream(streambuf * p) : basic_ios<char,Tr> (p) {}
0098 };
0099
0100 }
0101
0102
0103 namespace boost {
0104 namespace io {
0105
0106
0107
0108 template<class Ch>
0109 class CompatTraits< ::std::string_char_traits<Ch> >
0110 : public ::std::string_char_traits<Ch>
0111 {
0112 public:
0113 typedef CompatTraits compatible_type;
0114
0115 typedef Ch char_type;
0116 typedef int int_type;
0117 typedef ::std::streampos pos_type;
0118 typedef ::std::streamoff off_type;
0119
0120 static char_type
0121 to_char_type(const int_type& meta) {
0122 return static_cast<char_type>(meta); }
0123 static int_type
0124 to_int_type(const char_type& ch) {
0125 return static_cast<int_type>(static_cast<unsigned char>(ch) );}
0126 static bool
0127 eq_int_type(const int_type& left, const int_type& right) {
0128 return left == right; }
0129 static int_type
0130 eof() {
0131 return static_cast<int_type>(EOF);
0132 }
0133 static int_type
0134 not_eof(const int_type& meta) {
0135 return (meta == eof()) ? 0 : meta;
0136 }
0137 };
0138
0139 template<class Ch>
0140 class CompatTraits< ::std::char_traits<Ch> > {
0141 public:
0142 typedef CompatTraits< ::std::string_char_traits<Ch> > compatible_type;
0143 };
0144
0145
0146 template<>
0147 class CompatAlloc< ::std::alloc>
0148 {
0149 public:
0150 typedef ::std::allocator<char> compatible_type;
0151 };
0152
0153 }
0154 }
0155
0156
0157
0158
0159
0160 #endif
0161
0162 #endif