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 // basic_string<char> name() const; 13 14 #include <locale> 15 #include <cassert> 16 17 #include "platform_support.h" // locale name macros 18 19 int main() 20 { 21 { 22 std::locale loc; 23 assert(loc.name() == "C"); 24 } 25 { 26 std::locale loc(LOCALE_en_US_UTF_8); 27 assert(loc.name() == LOCALE_en_US_UTF_8); 28 } 29 } 30