1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // 'do_bytes' throws a std::range_error unexpectedly
11 // XFAIL: LIBCXX-WINDOWS-FIXME
13 // UNSUPPORTED: c++98, c++03
17 // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc>
19 // wstring_convert(wstring_convert&& other); // EXTENSION
27 typedef std::codecvt_utf8<wchar_t> Codecvt;
28 typedef std::wstring_convert<Codecvt> Myconv;
29 // create a converter and perform some conversions to generate some
32 myconv.from_bytes("\xF1\x80\x80\x83");
33 const auto old_converted = myconv.converted();
34 assert(myconv.converted() == 4);
35 // move construct a new converter and make sure the state is the same.
36 Myconv myconv2(std::move(myconv));
37 assert(myconv2.converted() == old_converted);