1 //===----------------------------------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 // UNSUPPORTED: libcpp-has-no-localization 10 11 // <locale.h> 12 13 #include <locale.h> 14 #include <type_traits> 15 16 #include "test_macros.h" 17 18 #ifndef LC_ALL 19 #error LC_ALL not defined 20 #endif 21 22 #ifndef LC_COLLATE 23 #error LC_COLLATE not defined 24 #endif 25 26 #ifndef LC_CTYPE 27 #error LC_CTYPE not defined 28 #endif 29 30 #ifndef LC_MONETARY 31 #error LC_MONETARY not defined 32 #endif 33 34 #ifndef LC_NUMERIC 35 #error LC_NUMERIC not defined 36 #endif 37 38 #ifndef LC_TIME 39 #error LC_TIME not defined 40 #endif 41 42 #ifndef NULL 43 #error NULL not defined 44 #endif 45 main(int,char **)46int main(int, char**) 47 { 48 lconv lc; ((void)lc); 49 static_assert((std::is_same<decltype(setlocale(0, "")), char*>::value), ""); 50 static_assert((std::is_same<decltype(localeconv()), lconv*>::value), ""); 51 52 return 0; 53 } 54