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 //===----------------------------------------------------------------------===//
12 // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc>
14 // wstring_convert(Codecvt* pcvt = new Codecvt);
20 #include "test_macros.h"
25 typedef std::codecvt_utf8<wchar_t> Codecvt;
26 typedef std::wstring_convert<Codecvt> Myconv;
28 assert(myconv.converted() == 0);
31 typedef std::codecvt_utf8<wchar_t> Codecvt;
32 typedef std::wstring_convert<Codecvt> Myconv;
33 Myconv myconv(new Codecvt);
34 assert(myconv.converted() == 0);
36 static_assert(!std::is_convertible<Codecvt*, Myconv>::value, "");
37 static_assert( std::is_constructible<Myconv, Codecvt*>::value, "");