--- boost/boost/interprocess/streams/bufferstream.hpp +++ boost/boost/interprocess/streams/bufferstream.hpp @@ -263,23 +263,22 @@ typedef typename std::basic_ios::traits_type traits_type; private: - typedef std::basic_ios basic_ios_t; typedef std::basic_istream base_t; public: //!Constructor. //!Does not throw. basic_ibufferstream(std::ios_base::openmode mode = std::ios_base::in) - : basic_ios_t(), base_t(0), m_buf(mode | std::ios_base::in) - { basic_ios_t::init(&m_buf); } + : base_t(&m_buf), m_buf(mode | std::ios_base::in) + { } //!Constructor. Assigns formatting buffer. //!Does not throw. basic_ibufferstream(const CharT *buffer, std::size_t length, std::ios_base::openmode mode = std::ios_base::in) - : basic_ios_t(), base_t(0), + : base_t(&m_buf), m_buf(const_cast(buffer), length, mode | std::ios_base::in) - { basic_ios_t::init(&m_buf); } + { } ~basic_ibufferstream(){}; @@ -321,23 +320,22 @@ /// @cond private: - typedef std::basic_ios basic_ios_t; typedef std::basic_ostream base_t; /// @endcond public: //!Constructor. //!Does not throw. basic_obufferstream(std::ios_base::openmode mode = std::ios_base::out) - : basic_ios_t(), base_t(0), m_buf(mode | std::ios_base::out) - { basic_ios_t::init(&m_buf); } + : base_t(&m_buf), m_buf(mode | std::ios_base::out) + { } //!Constructor. Assigns formatting buffer. //!Does not throw. basic_obufferstream(CharT *buffer, std::size_t length, std::ios_base::openmode mode = std::ios_base::out) - : basic_ios_t(), base_t(0), + : base_t(&m_buf), m_buf(buffer, length, mode | std::ios_base::out) - { basic_ios_t::init(&m_buf); } + { } ~basic_obufferstream(){} @@ -381,7 +379,6 @@ /// @cond private: - typedef std::basic_ios basic_ios_t; typedef std::basic_iostream base_t; /// @endcond @@ -390,16 +387,16 @@ //!Does not throw. basic_bufferstream(std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) - : basic_ios_t(), base_t(0), m_buf(mode) - { basic_ios_t::init(&m_buf); } + : base_t(&m_buf), m_buf(mode) + { } //!Constructor. Assigns formatting buffer. //!Does not throw. basic_bufferstream(CharT *buffer, std::size_t length, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) - : basic_ios_t(), base_t(0), m_buf(buffer, length, mode) - { basic_ios_t::init(&m_buf); } + : base_t(&m_buf), m_buf(buffer, length, mode) + { } ~basic_bufferstream(){}