23 #if !defined(IOTRAITS_H) 28 #include <streambuf.h> 30 #if defined(__GNUC__) && __GNUC_MINOR__ <= 7 31 # define PORT_TEMPLATE_SPECIALIZATION 33 # define PORT_TEMPLATE_SPECIALIZATION template <> 38 template <
class charT>
struct ctype {};
47 char_type
newline()
const {
return '\n'; }
65 static inline char_type
eos() {
return char_type(); }
66 static inline int_type
eof() {
return -1; }
67 static inline int_type
not_eof(int_type c) {
return c == eof()? eof() + 1: c; }
68 static inline char_type
newline() {
return '\n'; }
70 static inline bool eq(char_type c1, char_type c2) {
return c1 == c2; }
71 static inline bool eq_int_type(int_type i1, int_type i2) {
return i1 == i2; }
72 static inline void assign(
char& to,
char from) { to = from; }
74 static inline char_type
to_char_type(int_type c) {
return char_type(c); }
75 static inline int_type
to_int_type(char_type c) {
return int_type(c); }
77 static inline char_type *
copy(char_type *dst, char_type
const *src, pos_type n)
82 static inline size_t length(char_type
const *s) {
return strlen(s); }
static size_t length(char_type const *s)
static int_type to_int_type(char_type c)
static int_type not_eof(int_type c)
char_type newline() const
static bool eq(char_type c1, char_type c2)
static char_type newline()
#define PORT_TEMPLATE_SPECIALIZATION
static char_type to_char_type(int_type c)
static char_type * copy(char_type *dst, char_type const *src, pos_type n)
static bool eq_int_type(int_type i1, int_type i2)
static void assign(char &to, char from)