Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / test / std / utilities / meta / meta.trans / meta.trans.other / enable_if.pass.cpp
blob54a4c1aa9b00048a9e431a66ee5c52bfb427f2a8
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 // enable_if
13 #include <type_traits>
15 #include "test_macros.h"
17 int main(int, char**)
19 ASSERT_SAME_TYPE(void, std::enable_if<true>::type);
20 ASSERT_SAME_TYPE(int, std::enable_if<true, int>::type);
21 #if TEST_STD_VER > 11
22 ASSERT_SAME_TYPE(void, std::enable_if_t<true, void>);
23 ASSERT_SAME_TYPE(int, std::enable_if_t<true, int>);
24 #endif
26 return 0;