• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.h>
11 
12 #include <locale.h>
13 #include <type_traits>
14 
15 #ifndef LC_ALL
16 #error LC_ALL not defined
17 #endif
18 
19 #ifndef LC_COLLATE
20 #error LC_COLLATE not defined
21 #endif
22 
23 #ifndef LC_CTYPE
24 #error LC_CTYPE not defined
25 #endif
26 
27 #ifndef LC_MONETARY
28 #error LC_MONETARY not defined
29 #endif
30 
31 #ifndef LC_NUMERIC
32 #error LC_NUMERIC not defined
33 #endif
34 
35 #ifndef LC_TIME
36 #error LC_TIME not defined
37 #endif
38 
39 #ifndef NULL
40 #error NULL not defined
41 #endif
42 
main()43 int main()
44 {
45     lconv lc; ((void)lc);
46     static_assert((std::is_same<decltype(setlocale(0, "")), char*>::value), "");
47     static_assert((std::is_same<decltype(localeconv()), lconv*>::value), "");
48 }
49