Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::equal_to<void>

      From cppreference.com
      <cpp‎ |utility‎ |functional
       
       
      Utilities library
       
      Function objects
      Function invocation
      (C++17)(C++23)
      Identity function object
      (C++20)
      Transparent operator wrappers
      (C++14)
      (C++14)
      (C++14)
      (C++14)  
      (C++14)
      (C++14)
      (C++14)
      (C++14)
      (C++14)
      (C++14)
      equal_to<>
      (C++14)
      (C++14)
      (C++14)

      Old binders and adaptors
      (until C++17*)
      (until C++17*)
      (until C++17*)
      (until C++17*)  
      (until C++17*)
      (until C++17*)(until C++17*)(until C++17*)(until C++17*)
      (until C++20*)
      (until C++20*)
      (until C++17*)(until C++17*)
      (until C++17*)(until C++17*)

      (until C++17*)
      (until C++17*)(until C++17*)(until C++17*)(until C++17*)
      (until C++20*)
      (until C++20*)
       
      Defined in header<functional>
      template<>
      class equal_to<void>;
      (since C++14)

      std::equal_to<void> is a specialization ofstd::equal_to with parameter and return type deduced.

      Contents

      [edit]Nested types

      Nested type Definition
      is_transparentunspecified

      [edit]Member functions

      operator()
      tests if the two arguments compare equal
      (public member function)

      std::equal_to<void>::operator()

      template<class T,class U>

      constexprauto operator()( T&& lhs, U&& rhs)const

         -> decltype(std::forward<T>(lhs)==std::forward<U>(rhs));

      Returns the result of equality comparison betweenlhs andrhs.

      Parameters

      lhs, rhs - values to compare

      Return value

      std::forward<T>(lhs)==std::forward<U>(rhs).

      [edit]Example

      Run this code
      #include <functional> int main(){constexprint a=0, b=8;std::equal_to<> equal{};    static_assert(equal(a, a));    static_assert(!equal(a, b));}
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/utility/functional/equal_to_void&oldid=179774"

      [8]ページ先頭

      ©2009-2025 Movatter.jp