From 270082a7e126f727437c99ab8403185e9f29244c Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 14 Nov 2019 16:53:18 +0000 Subject: libstdc++: Implement new predicate concepts from P1716R3 * include/bits/iterator_concepts.h (__iter_concept_impl): Add comments. (indirect_relation): Rename to indirect_binary_predicate and adjust definition as per P1716R3. (indirect_equivalence_relation): Define. (indirectly_comparable): Adjust definition. * include/std/concepts (equivalence_relation): Define. * testsuite/std/concepts/concepts.callable/relation.cc: Add tests for equivalence_relation. From-SVN: r278256 --- libstdc++-v3/include/std/concepts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'libstdc++-v3/include/std/concepts') diff --git a/libstdc++-v3/include/std/concepts b/libstdc++-v3/include/std/concepts index c4acfd2..e6d405a 100644 --- a/libstdc++-v3/include/std/concepts +++ b/libstdc++-v3/include/std/concepts @@ -334,26 +334,30 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // [concepts.callable], callable concepts - // [concept.invocable], concept invocable + /// [concept.invocable], concept invocable template concept invocable = is_invocable_v<_Fn, _Args...>; - // [concept.regularinvocable], concept regular_invocable + /// [concept.regularinvocable], concept regular_invocable template concept regular_invocable = invocable<_Fn, _Args...>; - // [concept.predicate], concept predicate + /// [concept.predicate], concept predicate template concept predicate = regular_invocable<_Fn, _Args...> && boolean>; - // [concept.relation], concept relation + /// [concept.relation], concept relation template concept relation = predicate<_Rel, _Tp, _Tp> && predicate<_Rel, _Up, _Up> && predicate<_Rel, _Tp, _Up> && predicate<_Rel, _Up, _Tp>; - // [concept.strictweakorder], concept strict_weak_order + /// [concept.equiv], concept equivalence_relation + template + concept equivalence_relation = relation<_Rel, _Tp, _Up>; + + /// [concept.strictweakorder], concept strict_weak_order template concept strict_weak_order = relation<_Rel, _Tp, _Up>; -- cgit v1.1