brintos

brintos / llvm-project-archived public Read only

0
0
Text · 750 B · 54a4c1a Raw
28 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// type_traits10 11// enable_if12 13#include <type_traits>14 15#include "test_macros.h"16 17int main(int, char**)18{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 > 1122    ASSERT_SAME_TYPE(void, std::enable_if_t<true, void>);23    ASSERT_SAME_TYPE(int,  std::enable_if_t<true, int>);24#endif25 26  return 0;27}28