trunk/src/lib/util/vecstream.h
| r253951 | r253952 | |
| 19 | 19 | |
| 20 | 20 | #include <algorithm> |
| 21 | 21 | #include <cassert> |
| 22 | #include <ios> |
| 23 | #include <istream> |
| 22 | 24 | #include <ostream> |
| 25 | #include <memory> |
| 26 | #include <ostream> |
| 23 | 27 | #include <streambuf> |
| 24 | 28 | #include <string> |
| 25 | 29 | #include <type_traits> |
| r253951 | r253952 | |
| 103 | 107 | |
| 104 | 108 | void swap(basic_vectorbuf &that) |
| 105 | 109 | { |
| 110 | using std::swap; |
| 106 | 111 | std::basic_streambuf<CharT, Traits>::swap(that); |
| 107 | | std::swap(m_mode, that.m_mode); |
| 108 | | m_storage.swap(that.m_storage); |
| 109 | | std::swap(m_threshold, that.m_threshold); |
| 112 | swap(m_mode, that.m_mode); |
| 113 | swap(m_storage, that.m_storage); |
| 114 | swap(m_threshold, that.m_threshold); |
| 110 | 115 | } |
| 111 | 116 | |
| 112 | 117 | void reserve(typename vector_type::size_type size) |
| r253951 | r253952 | |
| 382 | 387 | typedef basic_vectorstream<char> vectorstream; |
| 383 | 388 | typedef basic_vectorstream<wchar_t> wvectorstream; |
| 384 | 389 | |
| 390 | template <typename CharT, typename Traits, typename Allocator> |
| 391 | void swap(basic_vectorbuf<CharT, Traits, Allocator> &a, basic_vectorbuf<CharT, Traits, Allocator> &b) { a.swap(b); } |
| 392 | |
| 393 | template <typename CharT, typename Traits, typename Allocator> |
| 394 | void swap(basic_ivectorstream<CharT, Traits, Allocator> &a, basic_ivectorstream<CharT, Traits, Allocator> &b) { a.swap(b); } |
| 395 | template <typename CharT, typename Traits, typename Allocator> |
| 396 | void swap(basic_ovectorstream<CharT, Traits, Allocator> &a, basic_ovectorstream<CharT, Traits, Allocator> &b) { a.swap(b); } |
| 397 | template <typename CharT, typename Traits, typename Allocator> |
| 398 | void swap(basic_vectorstream<CharT, Traits, Allocator> &a, basic_vectorstream<CharT, Traits, Allocator> &b) { a.swap(b); } |
| 399 | |
| 385 | 400 | } // namespace util |
| 386 | 401 | |
| 387 | 402 | #endif // __MAME_UTIL_VECSTREAM_H__ |