VCCC  2024.05
VisualCamp Common C++ library
equal_to.hpp
Go to the documentation of this file.
1 //
2 // Created by YongGyu Lee on 2024/01/12.
3 //
4 
5 #ifndef VCCC_FUNCTIONAL_EQUAL_TO_HPP
6 #define VCCC_FUNCTIONAL_EQUAL_TO_HPP
7 
8 #include <type_traits>
9 #include <utility>
10 
13 
14 namespace vccc {
15 namespace ranges {
16 
19 
20 struct equal_to {
21  using is_transparent = std::true_type;
22 
24  constexpr bool operator()(T&& t, U&& u) const
25  noexcept(noexcept(bool(std::forward<T>(t) == std::forward<U>(u))))
26  {
27  return std::forward<T>(t) == std::forward<U>(u);
28  }
29 };
30 
31 
33 
34 } // namespace ranges
35 } // namespace vccc
36 
37 #endif // VCCC_FUNCTIONAL_EQUAL_TO_HPP
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
Definition: equal_to.hpp:20
std::true_type is_transparent
Definition: equal_to.hpp:21
constexpr bool operator()(T &&t, U &&u) const noexcept(noexcept(bool(std::forward< T >(t)==std::forward< U >(u))))
Definition: equal_to.hpp:24