[SandboxVec][Utils] Implement Utils::verifyFunction() (#124356)
[llvm-project.git] / libcxx / test / std / utilities / meta / meta.trans / meta.trans.arr / remove_all_extents.pass.cpp
blob1a999bd6432539f927d97765b08e510ea2058817
1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
9 // type_traits
11 // remove_all_extents
13 #include <type_traits>
15 #include "test_macros.h"
17 enum Enum {zero, one_};
19 template <class T, class U>
20 void test_remove_all_extents()
22 ASSERT_SAME_TYPE(U, typename std::remove_all_extents<T>::type);
23 #if TEST_STD_VER > 11
24 ASSERT_SAME_TYPE(U, std::remove_all_extents_t<T>);
25 #endif
28 int main(int, char**)
30 test_remove_all_extents<int, int> ();
31 test_remove_all_extents<const Enum, const Enum> ();
32 test_remove_all_extents<int[], int> ();
33 test_remove_all_extents<const int[], const int> ();
34 test_remove_all_extents<int[3], int> ();
35 test_remove_all_extents<const int[3], const int> ();
36 test_remove_all_extents<int[][3], int> ();
37 test_remove_all_extents<const int[][3], const int> ();
38 test_remove_all_extents<int[2][3], int> ();
39 test_remove_all_extents<const int[2][3], const int> ();
40 test_remove_all_extents<int[1][2][3], int> ();
41 test_remove_all_extents<const int[1][2][3], const int> ();
43 return 0;