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_remove_volatile_imp()
20 ASSERT_SAME_TYPE(U
, typename
std::remove_volatile
<T
>::type
);
22 ASSERT_SAME_TYPE(U
, std::remove_volatile_t
<T
>);
27 void test_remove_volatile()
29 test_remove_volatile_imp
<T
, T
>();
30 test_remove_volatile_imp
<const T
, const T
>();
31 test_remove_volatile_imp
<volatile T
, T
>();
32 test_remove_volatile_imp
<const volatile T
, const T
>();
37 test_remove_volatile
<void>();
38 test_remove_volatile
<int>();
39 test_remove_volatile
<int[3]>();
40 test_remove_volatile
<int&>();
41 test_remove_volatile
<const int&>();
42 test_remove_volatile
<int*>();
43 test_remove_volatile
<volatile int*>();