diff --git a/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_iterator.compile.pass.cpp b/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_iterator.compile.pass.cpp --- a/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_iterator.compile.pass.cpp +++ b/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_iterator.compile.pass.cpp @@ -31,16 +31,9 @@ static_assert(!std::ranges::__nothrow_forward_iterator); constexpr bool forward_subsumes_input(std::ranges::__nothrow_forward_iterator auto) - requires true { + requires true { return true; } constexpr bool forward_subsumes_input(std::ranges::__nothrow_input_iterator auto); -constexpr bool input_subsumes_forward(std::ranges::__nothrow_input_iterator auto) - requires true { - return true; -} -constexpr bool input_subsumes_forward(std::ranges::__nothrow_forward_iterator auto); - static_assert(forward_subsumes_input("foo")); -static_assert(!input_subsumes_forward("foo")); diff --git a/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_range.compile.pass.cpp b/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_range.compile.pass.cpp --- a/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_range.compile.pass.cpp +++ b/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_range.compile.pass.cpp @@ -12,6 +12,7 @@ // template // concept __nothrow_forward_range; +#include #include #include "test_iterators.h" @@ -33,3 +34,12 @@ static_assert(!std::ranges::__nothrow_forward_range>); static_assert(std::ranges::forward_range>); static_assert(!std::ranges::__nothrow_forward_range>); + +constexpr bool forward_subsumes_input(std::ranges::__nothrow_forward_range auto) + requires true { + return true; +} +constexpr bool forward_subsumes_input(std::ranges::__nothrow_input_range auto); + +constexpr std::array array{}; +static_assert(forward_subsumes_input(array));