Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/concepts/relation"

From cppreference.com
< cpp‎ | concepts
m
m (fmt)
Line 4: Line 4:
 
{{dcl header|concepts}}
 
{{dcl header|concepts}}
 
{{dcl|since=c++20|num=1|1=
 
{{dcl|since=c++20|num=1|1=
template <class R, class T, class U>
+
template< class R, class T, class U >
 
concept relation =
 
concept relation =
  std::predicate<R, T, T> && std::predicate<R, U, U> &&
+
    std::predicate<R, T, T> && std::predicate<R, U, U> &&
  std::predicate<R, T, U> && std::predicate<R, U, T>;
+
    std::predicate<R, T, U> && std::predicate<R, U, T>;
 
}}
 
}}
 
{{dcl end}}
 
{{dcl end}}

Revision as of 23:59, 29 October 2023

Defined in header <concepts>
template< class R, class T, class U >

concept relation =
    std::predicate<R, T, T> && std::predicate<R, U, U> &&

    std::predicate<R, T, U> && std::predicate<R, U, T>;
(1) (since C++20)

The concept relation<R, T, U> specifies that R defines a binary relation over the set of expressions whose type and value category are those encoded by either T or U.