Howard Hinnant | 1347d33 | 2013-04-03 20:21:29 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | // Source Licenses. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | // <sstream> |
| 11 | |
| 12 | // template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> > |
| 13 | // class basic_stringstream |
| 14 | |
| 15 | // basic_stringstream(basic_stringstream&& rhs); |
| 16 | |
| 17 | #include <sstream> |
| 18 | #include <vector> |
| 19 | #include <string> |
| 20 | #include <cassert> |
Stephan T. Lavavej | e898b48 | 2016-11-23 22:01:19 +0000 | [diff] [blame] | 21 | #include <cstddef> |
Howard Hinnant | 1347d33 | 2013-04-03 20:21:29 +0000 | [diff] [blame] | 22 | |
| 23 | int main() |
| 24 | { |
| 25 | #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES |
| 26 | std::vector<std::istringstream> vecis; |
| 27 | vecis.push_back(std::istringstream()); |
| 28 | vecis.back().str("hub started at [00 6b 8b 45 69]"); |
| 29 | vecis.push_back(std::istringstream()); |
| 30 | vecis.back().str("hub started at [00 6b 8b 45 69]"); |
Stephan T. Lavavej | e898b48 | 2016-11-23 22:01:19 +0000 | [diff] [blame] | 31 | for (std::size_t n = 0; n < vecis.size(); n++) |
Howard Hinnant | 1347d33 | 2013-04-03 20:21:29 +0000 | [diff] [blame] | 32 | { |
| 33 | assert(vecis[n].str().size() == 31); |
| 34 | vecis[n].seekg(0, std::ios_base::beg); |
| 35 | assert(vecis[n].str().size() == 31); |
| 36 | } |
| 37 | #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES |
| 38 | } |