Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
Howard Hinnant | 5b08a8a | 2010-05-11 21:36:01 +0000 | [diff] [blame] | 3 | // The LLVM Compiler Infrastructure |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 4 | // |
Howard Hinnant | 412dbeb | 2010-11-16 22:09:02 +0000 | [diff] [blame] | 5 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | // Source Licenses. See LICENSE.TXT for details. |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 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 | |
| 43 | int main() |
| 44 | { |
| 45 | lconv lc; |
| 46 | static_assert((std::is_same<__typeof__(setlocale(0, "")), char*>::value), ""); |
| 47 | static_assert((std::is_same<__typeof__(localeconv()), lconv*>::value), ""); |
| 48 | } |