Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::equivalence_relation

      From cppreference.com
      <cpp‎ |concepts
       
       
      Concepts library
       
      Defined in header<concepts>
      template<class R,class T,class U>
      concept equivalence_relation=std::relation<R, T, U>;
      (since C++20)

      The conceptequivalence_relation<R, T, U> specifies that therelationR imposes anequivalence relation on its arguments.

      [edit]Semantic requirements

      A relationr is an equivalence relation if

      • it is reflexive: for allx,r(x, x) istrue;
      • it is symmetric: for alla andb,r(a, b) istrue if and only ifr(b, a) istrue;
      • it is transitive:r(a, b) && r(b, c) impliesr(a, c).

      [edit]Notes

      The distinction betweenrelation andequivalence_relation is purely semantic.

      [edit]References

      • C++23 standard (ISO/IEC 14882:2024):
      • 18.7.6 Conceptequivalence_relation [concept.equiv]
      • C++20 standard (ISO/IEC 14882:2020):
      • 18.7.6 Conceptequivalence_relation [concept.equiv]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/concepts/equivalence_relation&oldid=177901"

      [8]ページ先頭

      ©2009-2026 Movatter.jp