clocale.pass.cpp revision f5256e16dfc425c1d466f6308d4026d529ce9e0b
1//===----------------------------------------------------------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10// <clocale>
11
12#include <clocale>
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    std::lconv lc;
46    static_assert((std::is_same<__typeof__(std::setlocale(0, "")), char*>::value), "");
47    static_assert((std::is_same<__typeof__(std::localeconv()), std::lconv*>::value), "");
48}
49