blob: 6ecf5a82e8dde5ada40551fa018e85aa0ef91f14 [file] [log] [blame]
Howard Hinnant3e519522010-05-11 19:42:16 +00001//===----------------------------------------------------------------------===//
2//
Howard Hinnant5b08a8a2010-05-11 21:36:01 +00003// The LLVM Compiler Infrastructure
Howard Hinnant3e519522010-05-11 19:42:16 +00004//
Howard Hinnant412dbeb2010-11-16 22:09:02 +00005// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
Howard Hinnant3e519522010-05-11 19:42:16 +00007//
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
43int main()
44{
45 lconv lc;
Marshall Clow79e23cb2014-10-21 15:07:09 +000046 static_assert((std::is_same<decltype(setlocale(0, "")), char*>::value), "");
47 static_assert((std::is_same<decltype(localeconv()), lconv*>::value), "");
Howard Hinnant3e519522010-05-11 19:42:16 +000048}