Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/thread/ostream_buffer.hpp @ 133:4acb5d8d80b6 tip
Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author | Chris Cannam |
---|---|
date | Tue, 30 Jul 2019 12:25:44 +0100 |
parents | f46d142149f5 |
children |
rev | line source |
---|---|
Chris@102 | 1 // (C) Copyright 2013 Vicente J. Botet Escriba |
Chris@102 | 2 // Distributed under the Boost Software License, Version 1.0. (See |
Chris@102 | 3 // accompanying file LICENSE_1_0.txt or copy at |
Chris@102 | 4 // http://www.boost.org/LICENSE_1_0.txt) |
Chris@102 | 5 |
Chris@102 | 6 |
Chris@102 | 7 #ifndef BOOST_THREAD_OSTREAM_BUFFER_HPP |
Chris@102 | 8 #define BOOST_THREAD_OSTREAM_BUFFER_HPP |
Chris@102 | 9 |
Chris@102 | 10 #include <boost/thread/detail/config.hpp> |
Chris@102 | 11 #include <boost/thread/detail/delete.hpp> |
Chris@102 | 12 #include <sstream> |
Chris@102 | 13 |
Chris@102 | 14 #include <boost/config/abi_prefix.hpp> |
Chris@102 | 15 |
Chris@102 | 16 namespace boost |
Chris@102 | 17 { |
Chris@102 | 18 |
Chris@102 | 19 template <typename OStream> |
Chris@102 | 20 class ostream_buffer |
Chris@102 | 21 { |
Chris@102 | 22 public: |
Chris@102 | 23 typedef std::basic_ostringstream<typename OStream::char_type, typename OStream::traits_type> stream_type; |
Chris@102 | 24 ostream_buffer(OStream& os) : |
Chris@102 | 25 os_(os) |
Chris@102 | 26 { |
Chris@102 | 27 } |
Chris@102 | 28 ~ostream_buffer() |
Chris@102 | 29 { |
Chris@102 | 30 os_ << o_str_.str(); |
Chris@102 | 31 } |
Chris@102 | 32 stream_type& stream() |
Chris@102 | 33 { |
Chris@102 | 34 return o_str_; |
Chris@102 | 35 } |
Chris@102 | 36 private: |
Chris@102 | 37 OStream& os_; |
Chris@102 | 38 stream_type o_str_; |
Chris@102 | 39 }; |
Chris@102 | 40 |
Chris@102 | 41 } |
Chris@102 | 42 |
Chris@102 | 43 #include <boost/config/abi_suffix.hpp> |
Chris@102 | 44 |
Chris@102 | 45 #endif // header |