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>
16 #include "test_macros.h"
21 typedef std::bool_constant
<true> _t
;
22 static_assert(_t::value
, "");
23 static_assert((std::is_same
<_t::value_type
, bool>::value
), "");
24 static_assert((std::is_same
<_t::type
, _t
>::value
), "");
25 static_assert((_t() == true), "");
27 typedef std::bool_constant
<false> _f
;
28 static_assert(!_f::value
, "");
29 static_assert((std::is_same
<_f::value_type
, bool>::value
), "");
30 static_assert((std::is_same
<_f::type
, _f
>::value
), "");
31 static_assert((_f() == false), "");