Home | History | Annotate | Download | only in conversions.string
      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 // <locale>
     11 
     12 // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc>
     13 
     14 // wstring_convert(Codecvt* pcvt = new Codecvt);
     15 
     16 #include <locale>
     17 #include <codecvt>
     18 #include <cassert>
     19 
     20 int main()
     21 {
     22     {
     23         typedef std::codecvt_utf8<wchar_t> Codecvt;
     24         typedef std::wstring_convert<Codecvt> Myconv;
     25         Myconv myconv;
     26         assert(myconv.converted() == 0);
     27     }
     28     {
     29         typedef std::codecvt_utf8<wchar_t> Codecvt;
     30         typedef std::wstring_convert<Codecvt> Myconv;
     31         Myconv myconv(new Codecvt);
     32         assert(myconv.converted() == 0);
     33     }
     34 }
     35