forked from boostorg/io
Compatibility with GCC 4.6
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2021 Glen Joseph Fernandes
|
Copyright 2021-2022 Glen Joseph Fernandes
|
||||||
(glenjofe@gmail.com)
|
(glenjofe@gmail.com)
|
||||||
|
|
||||||
Distributed under the Boost Software License, Version 1.0.
|
Distributed under the Boost Software License, Version 1.0.
|
||||||
@ -32,8 +32,14 @@ protected:
|
|||||||
namespace detail {
|
namespace detail {
|
||||||
|
|
||||||
template<class CharT, class Traits>
|
template<class CharT, class Traits>
|
||||||
struct nullbuf {
|
class nullbuf {
|
||||||
boost::io::basic_nullbuf<CharT, Traits> buf;
|
public:
|
||||||
|
boost::io::basic_nullbuf<CharT, Traits>* buf() {
|
||||||
|
return &buf_;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
boost::io::basic_nullbuf<CharT, Traits> buf_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* detail */
|
} /* detail */
|
||||||
@ -44,8 +50,8 @@ class basic_onullstream
|
|||||||
, public std::basic_ostream<CharT, Traits> {
|
, public std::basic_ostream<CharT, Traits> {
|
||||||
public:
|
public:
|
||||||
basic_onullstream()
|
basic_onullstream()
|
||||||
: std::basic_ostream<CharT, Traits>(&(detail::nullbuf<CharT,
|
: std::basic_ostream<CharT, Traits>(detail::nullbuf<CharT,
|
||||||
Traits>::buf)) { }
|
Traits>::buf()) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef basic_onullstream<char> onullstream;
|
typedef basic_onullstream<char> onullstream;
|
||||||
|
Reference in New Issue
Block a user