12 #include <type_traits>
16 inline namespace _V1 {
18 template <
typename T =
void>
using plus = std::plus<T>;
19 template <
typename T =
void>
using multiplies = std::multiplies<T>;
20 template <
typename T =
void>
using bit_and = std::bit_and<T>;
21 template <
typename T =
void>
using bit_or = std::bit_or<T>;
22 template <
typename T =
void>
using bit_xor = std::bit_xor<T>;
27 T
operator()(
const T &lhs,
const T &rhs)
const {
return lhs && rhs; }
30 template <>
struct logical_and<void> : std::logical_and<void> {};
33 T
operator()(
const T &lhs,
const T &rhs)
const {
return lhs || rhs; }
36 template <>
struct logical_or<void> : std::logical_or<void> {};
39 template <
typename T =
void>
struct minimum {
41 return (rhs < lhs) ? rhs : lhs;
46 struct is_transparent {};
47 template <
typename T,
typename U>
49 typename std::common_type<T &&, U &&>::type {
50 return (std::forward<const U>(rhs) < std::forward<const T>(lhs))
51 ? std::forward<U>(rhs)
52 : std::forward<T>(lhs);
57 template <
typename T =
void>
struct maximum {
59 return (lhs < rhs) ? rhs : lhs;
64 struct is_transparent {};
65 template <
typename T,
typename U>
67 typename std::common_type<T &&, U &&>::type {
68 return (std::forward<const T>(lhs) < std::forward<const U>(rhs))
69 ? std::forward<U>(rhs)
70 : std::forward<T>(lhs);
std::bit_and< T > bit_and
std::multiplies< T > multiplies
std::bit_xor< T > bit_xor
T operator()(const T &lhs, const T &rhs) const
T operator()(const T &lhs, const T &rhs) const
auto operator()(T &&lhs, U &&rhs) const -> typename std::common_type< T &&, U && >::type
T operator()(const T &lhs, const T &rhs) const
auto operator()(T &&lhs, U &&rhs) const -> typename std::common_type< T &&, U && >::type
T operator()(const T &lhs, const T &rhs) const