| //===----------------------------------------------------------------------===// |
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| // See https://llvm.org/LICENSE.txt for license information. |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| //===----------------------------------------------------------------------===// |
| // UNSUPPORTED: c++98, c++03 |
| // template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> > |
| // class basic_istringstream |
| // basic_istringstream& operator=(basic_istringstream&& rhs); |
| std::istringstream ss0(" 123 456"); |
| assert(ss.str() == " 123 456"); |
| std::istringstream s1("Aaaaa Bbbbb Cccccccccc Dddddddddddddddddd"); |
| std::istringstream s2 = std::move(s1); |
| assert(s == "Cccccccccc"); |
| assert(s == "Dddddddddddddddddd"); |
| std::wistringstream ss0(L" 123 456"); |
| assert(ss.str() == L" 123 456"); |
| std::wistringstream s1(L"Aaaaa Bbbbb Cccccccccc Dddddddddddddddddd"); |
| std::wistringstream s2 = std::move(s1); |
| assert(s == L"Cccccccccc"); |
| assert(s == L"Dddddddddddddddddd"); |