| //===----------------------------------------------------------------------===// |
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| // See https://llvm.org/LICENSE.txt for license information. |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| //===----------------------------------------------------------------------===// |
| // UNSUPPORTED: c++98, c++03, c++11 |
| // equal_to, not_equal_to, less, et al. |
| // Test that these types can be constructed w/o an initializer in a constexpr |
| // context. This is specifically testing gcc.gnu.org/PR83921 |
| constexpr bool test_constexpr_context() { |
| std::not_equal_to<T> neq; |
| std::greater_equal<T> ge; |
| static_assert(test_constexpr_context<int>(), ""); |
| static_assert(test_constexpr_context<void>(), ""); |