1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
12 #include <type_traits>
14 #include "test_macros.h"
16 #ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
19 #error LC_ALL not defined
23 #error LC_COLLATE not defined
27 #error LC_CTYPE not defined
31 #error LC_MONETARY not defined
35 #error LC_NUMERIC not defined
39 #error LC_TIME not defined
42 #endif // !_LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
45 #error NULL not defined
51 ((void)lc
); // Prevent unused warning
52 #ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
53 static_assert((std::is_same
<decltype(std::setlocale(0, "")), char*>::value
), "");
55 static_assert((std::is_same
<decltype(std::localeconv()), std::lconv
*>::value
), "");