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 // <iomanip> 11 12 // quoted 13 14 #include <iomanip> 15 #include <sstream> 16 #include <string> 17 #include <cassert> 18 19 #include "test_macros.h" 20 21 // Test that mismatches between strings and wide streams are diagnosed 22 23 #if TEST_STD_VER > 11 24 25 void round_trip ( const char *p ) { 26 std::wstringstream ss; 27 ss << std::quoted(p); 28 std::string s; 29 ss >> std::quoted(s); 30 } 31 32 33 34 int main() 35 { 36 round_trip ( "Hi Mom" ); 37 } 38 #else 39 #error 40 #endif 41