ctor_codecvt_state.pass.cpp revision d23b464e21648e252d5ae501b2db2e93dc02b1f7
1//===----------------------------------------------------------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. 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, state_type state); 15 16#include <locale> 17#include <codecvt> 18#include <cassert> 19 20int main() 21{ 22 { 23 typedef std::codecvt_utf8<wchar_t> Codecvt; 24 typedef std::wstring_convert<Codecvt> Myconv; 25 Myconv myconv(new Codecvt, std::mbstate_t()); 26 assert(myconv.converted() == 0); 27 } 28} 29