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 //===----------------------------------------------------------------------===//
13 // UNSUPPORTED: c++03, c++11, c++14
15 #include <type_traits>
17 #include "test_macros.h"
22 ASSERT_SAME_TYPE(void, std::void_t
<T
>);
23 ASSERT_SAME_TYPE(void, std::void_t
<const T
>);
24 ASSERT_SAME_TYPE(void, std::void_t
<volatile T
>);
25 ASSERT_SAME_TYPE(void, std::void_t
<const volatile T
>);
28 template <class T
, class U
>
31 ASSERT_SAME_TYPE(void, std::void_t
<T
, U
>);
32 ASSERT_SAME_TYPE(void, std::void_t
<const T
, U
>);
33 ASSERT_SAME_TYPE(void, std::void_t
<volatile T
, U
>);
34 ASSERT_SAME_TYPE(void, std::void_t
<const volatile T
, U
>);
36 ASSERT_SAME_TYPE(void, std::void_t
<U
, T
>);
37 ASSERT_SAME_TYPE(void, std::void_t
<U
, const T
>);
38 ASSERT_SAME_TYPE(void, std::void_t
<U
, volatile T
>);
39 ASSERT_SAME_TYPE(void, std::void_t
<U
, const volatile T
>);
41 ASSERT_SAME_TYPE(void, std::void_t
<T
, const U
>);
42 ASSERT_SAME_TYPE(void, std::void_t
<const T
, const U
>);
43 ASSERT_SAME_TYPE(void, std::void_t
<volatile T
, const U
>);
44 ASSERT_SAME_TYPE(void, std::void_t
<const volatile T
, const U
>);
55 ASSERT_SAME_TYPE(void, std::void_t
<>);
68 test2
<Class
&, bool>();
69 test2
<void *, int&>();
71 ASSERT_SAME_TYPE(void, std::void_t
<int, double const &, Class
, volatile int[], void>);