Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::strict_weak_order

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

      The conceptstrict_weak_order<R, T, U> specifies that therelationR imposes a strict weak ordering on its arguments.

      Contents

      [edit]Semantic requirements

      A relationr is a strict weak ordering if

      • it is irreflexive: for allx,r(x, x) isfalse;
      • it is transitive: for alla,b andc, ifr(a, b) andr(b, c) are bothtrue thenr(a, c) istrue;
      • lete(a, b) be!r(a, b)&&!r(b, a), thene is transitive:e(a, b)&& e(b, c) impliese(a, c).

      Under these conditions, it can be shown thate is an equivalence relation, andr induces a strict total ordering on the equivalence classes determined bye.

      [edit]Notes

      The distinction betweenrelation andstrict_weak_order is purely semantic.

      [edit]References

      • C++23 standard (ISO/IEC 14882:2024):
      • 18.7.7 Conceptstrict_weak_order [concept.strictweakorder]
      • C++20 standard (ISO/IEC 14882:2020):
      • 18.7.7 Conceptstrict_weak_order [concept.strictweakorder]

      [edit]See also

      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/concepts/strict_weak_order&oldid=177902"

      [8]ページ先頭

      ©2009-2025 Movatter.jp