Ticket #7156: bufferstream.hpp.patch
File bufferstream.hpp.patch, 2.9 KB (added by , 10 years ago) |
---|
-
boost/boost/interprocess/streams/bufferstream.hpp
263 263 typedef typename std::basic_ios<char_type, CharTraits>::traits_type traits_type; 264 264 265 265 private: 266 typedef std::basic_ios<char_type, CharTraits> basic_ios_t;267 266 typedef std::basic_istream<char_type, CharTraits> base_t; 268 267 269 268 public: 270 269 //!Constructor. 271 270 //!Does not throw. 272 271 basic_ibufferstream(std::ios_base::openmode mode = std::ios_base::in) 273 : bas ic_ios_t(), base_t(0), m_buf(mode | std::ios_base::in)274 { basic_ios_t::init(&m_buf);}272 : base_t(&m_buf), m_buf(mode | std::ios_base::in) 273 { } 275 274 276 275 //!Constructor. Assigns formatting buffer. 277 276 //!Does not throw. 278 277 basic_ibufferstream(const CharT *buffer, std::size_t length, 279 278 std::ios_base::openmode mode = std::ios_base::in) 280 : bas ic_ios_t(), base_t(0),279 : base_t(&m_buf), 281 280 m_buf(const_cast<CharT*>(buffer), length, mode | std::ios_base::in) 282 { basic_ios_t::init(&m_buf);}281 { } 283 282 284 283 ~basic_ibufferstream(){}; 285 284 … … 321 320 322 321 /// @cond 323 322 private: 324 typedef std::basic_ios<char_type, CharTraits> basic_ios_t;325 323 typedef std::basic_ostream<char_type, CharTraits> base_t; 326 324 /// @endcond 327 325 public: 328 326 //!Constructor. 329 327 //!Does not throw. 330 328 basic_obufferstream(std::ios_base::openmode mode = std::ios_base::out) 331 : bas ic_ios_t(), base_t(0), m_buf(mode | std::ios_base::out)332 { basic_ios_t::init(&m_buf);}329 : base_t(&m_buf), m_buf(mode | std::ios_base::out) 330 { } 333 331 334 332 //!Constructor. Assigns formatting buffer. 335 333 //!Does not throw. 336 334 basic_obufferstream(CharT *buffer, std::size_t length, 337 335 std::ios_base::openmode mode = std::ios_base::out) 338 : bas ic_ios_t(), base_t(0),336 : base_t(&m_buf), 339 337 m_buf(buffer, length, mode | std::ios_base::out) 340 { basic_ios_t::init(&m_buf);}338 { } 341 339 342 340 ~basic_obufferstream(){} 343 341 … … 381 379 382 380 /// @cond 383 381 private: 384 typedef std::basic_ios<char_type, CharTraits> basic_ios_t;385 382 typedef std::basic_iostream<char_type, CharTraits> base_t; 386 383 /// @endcond 387 384 … … 390 387 //!Does not throw. 391 388 basic_bufferstream(std::ios_base::openmode mode 392 389 = std::ios_base::in | std::ios_base::out) 393 : basic_ios_t(), base_t(0), m_buf(mode)394 { basic_ios_t::init(&m_buf);}390 : base_t(&m_buf), m_buf(mode) 391 { } 395 392 396 393 //!Constructor. Assigns formatting buffer. 397 394 //!Does not throw. 398 395 basic_bufferstream(CharT *buffer, std::size_t length, 399 396 std::ios_base::openmode mode 400 397 = std::ios_base::in | std::ios_base::out) 401 : basic_ios_t(), base_t(0), m_buf(buffer, length, mode)402 { basic_ios_t::init(&m_buf);}398 : base_t(&m_buf), m_buf(buffer, length, mode) 399 { } 403 400 404 401 ~basic_bufferstream(){} 405 402