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 #include <type_traits>
15 #include "test_macros.h"
17 template <class T
, class U
>
18 void test_add_cv_imp()
20 ASSERT_SAME_TYPE(const volatile U
, typename
std::add_cv
<T
>::type
);
22 ASSERT_SAME_TYPE(const volatile U
, std::add_cv_t
<T
>);
29 test_add_cv_imp
<T
, const volatile T
>();
30 test_add_cv_imp
<const T
, const volatile T
>();
31 test_add_cv_imp
<volatile T
, volatile const T
>();
32 test_add_cv_imp
<const volatile T
, const volatile T
>();
39 test_add_cv
<int[3]>();
41 test_add_cv
<const int&>();
43 test_add_cv
<const int*>();