Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::partial_order

      From cppreference.com
      <cpp‎ |utility
       
       
      Utilities library
       
      Defined in header<compare>
      inlinenamespace/* unspecified */{

         inlineconstexpr/* unspecified */ partial_order=/* unspecified */;

      }
      (since C++20)
      Call signature
      template<class T,class U>

          requires/* see below */
      constexprstd::partial_ordering

          partial_order( T&& t, U&& u)noexcept(/* see below */);

      Compares two values using 3-way comparison and produces a result of typestd::partial_ordering.

      Lett andu be expressions andT andU denotedecltype((t)) anddecltype((u)) respectively,std::partial_order(t, u) isexpression-equivalent to:

      Customization point objects

      The namestd::partial_order denotes acustomization point object, which is a constfunction object of aliteralsemiregular class type. SeeCustomizationPointObject for details.

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      the result type of 3-way comparison that supports all 6 operators, is not substitutable, and allows incomparable values
      (class)[edit]
      performs 3-way comparison and produces a result of typestd::strong_ordering
      (customization point object)[edit]
      (C++20)
      performs 3-way comparison and produces a result of typestd::weak_ordering
      (customization point object)[edit]
      performs 3-way comparison and produces a result of typestd::partial_ordering, even ifoperator<=> is unavailable
      (customization point object)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/utility/compare/partial_order&oldid=152000"

      [8]ページ先頭

      ©2009-2025 Movatter.jp