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 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11
13 // equal_to, not_equal_to, less, et al.
15 // Test that these types can be constructed w/o an initializer in a constexpr
16 // context. This is specifically testing gcc.gnu.org/PR83921
20 #include "test_macros.h"
23 constexpr bool test_constexpr_context() {
26 std::not_equal_to
<T
> neq
;
30 std::less_equal
<T
> le
;
34 std::greater_equal
<T
> ge
;
39 static_assert(test_constexpr_context
<int>(), "");
40 static_assert(test_constexpr_context
<void>(), "");
43 int main(int, char**) {