]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/std/utilities/meta/meta.unary.prop.query/void_t_feature_test_macro.pass.cpp
Vendor import of libc++ trunk r290819:
[FreeBSD/FreeBSD.git] / test / std / utilities / meta / meta.unary.prop.query / void_t_feature_test_macro.pass.cpp
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 // type_traits
11
12 // void_t
13
14 #include <type_traits>
15
16 #include "test_macros.h"
17
18 #if TEST_STD_VER <= 14
19 # ifdef __cpp_lib_void_t
20 #   error Feature test macro should not be defined!
21 # endif
22 #else
23 # ifndef __cpp_lib_void_t
24 #   error Feature test macro is not defined
25 # endif
26 # if __cpp_lib_void_t != 201411
27 #   error Feature test macro has the wrong value
28 # endif
29 #endif
30
31 int main()
32 {
33 #if defined(__cpp_lib_void_t)
34   static_assert(std::is_same_v<std::void_t<int>, void>, "");
35 #endif
36 }