Provides function objects to use. More...
Variables | |
constexpr plus_type | gears::functional::plus {} |
Function object performing addition. More... | |
constexpr minus_type | gears::functional::minus {} |
Function object performing subtraction. More... | |
constexpr multiplies_type | gears::functional::multiplies {} |
Function object performing multiplication. More... | |
constexpr divides_type | gears::functional::divides {} |
Function object performing division. More... | |
constexpr modulus_type | gears::functional::modulus {} |
Function object performing modulus. More... | |
constexpr bit_and_type | gears::functional::bit_and {} |
Function object performing bitwise and. More... | |
constexpr bit_or_type | gears::functional::bit_or {} |
Function object performing bitwise or. More... | |
constexpr bit_xor_type | gears::functional::bit_xor {} |
Function object performing bitwise xor. More... | |
constexpr bit_not_type | gears::functional::bit_not {} |
Function object performing bitwise not. More... | |
constexpr lshift_type | gears::functional::lshift {} |
Function object performing bitwise left shift. More... | |
constexpr rshift_type | gears::functional::rshift {} |
Function object performing bitwise right shift. More... | |
constexpr equal_to_type | gears::functional::equal_to {} |
Function object performing equality comparison. More... | |
constexpr not_equal_to_type | gears::functional::not_equal_to {} |
Function object performing inequality comparison. More... | |
constexpr greater_type | gears::functional::greater {} |
Function object performing greater than comparison. More... | |
constexpr less_type | gears::functional::less {} |
Function object performing less than comparison. More... | |
constexpr greater_equal_type | gears::functional::greater_equal {} |
Function object performing greater than or equal comparison. More... | |
constexpr less_equal_type | gears::functional::less_equal {} |
Function object performing less than or equal comparison. More... | |
constexpr logical_and_type | gears::functional::logical_and {} |
Function object performing logical and. More... | |
constexpr logical_or_type | gears::functional::logical_or {} |
Function object performing logical or. More... | |
constexpr logical_not_type | gears::functional::logical_not {} |
Function object performing logical not. More... | |
constexpr even_type | gears::functional::even {} |
Function object checking if a numeric type is even. More... | |
constexpr odd_type | gears::functional::odd {} |
Function object checking if a numeric type is odd. More... | |
A function object is any object for which the function call operator is defined. An instance of a function object could be called just like a regular function and could emulate functions as first class citizens.
constexpr bit_and_type gears::functional::bit_and {} |
Effectively calls operator&
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | left parameter to bit and |
u | right parameter to bit and |
t & u
Definition at line 84 of file bitwise_operators.hpp.
constexpr bit_not_type gears::functional::bit_not {} |
Effectively calls operator~
on a variable in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | parameter to bit not |
~t
Definition at line 128 of file bitwise_operators.hpp.
constexpr bit_or_type gears::functional::bit_or {} |
Effectively calls operator|
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | left parameter to bit or |
u | right parameter to bit or |
t | u
Definition at line 99 of file bitwise_operators.hpp.
constexpr bit_xor_type gears::functional::bit_xor {} |
Effectively calls operator^
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | left parameter to xor |
u | right parameter to xor |
t ^ u
Definition at line 114 of file bitwise_operators.hpp.
constexpr divides_type gears::functional::divides {} |
Effectively calls operator/
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | left parameter to divide |
u | right parameter to divide |
t / u
Definition at line 118 of file arithmetic_operators.hpp.
constexpr equal_to_type gears::functional::equal_to {} |
Effectively calls operator==
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | left side to compare |
u | right side to compare |
t == u
Definition at line 83 of file comparison_operators.hpp.
constexpr even_type gears::functional::even {} |
Checks if a numeric instance is even by effectively checking if t % 2 == 0
.
t | numeric type to check |
t % 2 == 0
, usually bool. Definition at line 53 of file numeric_properties.hpp.
constexpr greater_type gears::functional::greater {} |
Effectively calls operator>
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | left side to compare |
u | right side to compare |
t > u
Definition at line 111 of file comparison_operators.hpp.
constexpr greater_equal_type gears::functional::greater_equal {} |
Effectively calls operator>=
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | left side to compare |
u | right side to compare |
t >= u
Definition at line 139 of file comparison_operators.hpp.
constexpr less_type gears::functional::less {} |
Effectively calls operator<
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | left side to compare |
u | right side to compare |
t < u
Definition at line 125 of file comparison_operators.hpp.
constexpr less_equal_type gears::functional::less_equal {} |
Effectively calls operator<=
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | left side to compare |
u | right side to compare |
t <= u
Definition at line 153 of file comparison_operators.hpp.
constexpr logical_and_type gears::functional::logical_and {} |
Effectively calls operator&&
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
Note that this does not short circuit.
t | left side to check |
u | right side to check |
t && u
Definition at line 64 of file logical_operators.hpp.
constexpr logical_not_type gears::functional::logical_not {} |
Effectively calls operator!
on a variable in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | object to logically negate |
!t
Definition at line 93 of file logical_operators.hpp.
constexpr logical_or_type gears::functional::logical_or {} |
Effectively calls operator||
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
Note that this does not short circuit.
t | left side to check |
u | right side to check |
t || u
Definition at line 80 of file logical_operators.hpp.
constexpr lshift_type gears::functional::lshift {} |
Effectively calls operator<<
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | left parameter to left shift |
u | right parameter to left shift |
t << u
Definition at line 143 of file bitwise_operators.hpp.
constexpr minus_type gears::functional::minus {} |
Effectively calls operator-
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | left parameter to subtract |
u | right parameter to subtract |
t - u
Definition at line 90 of file arithmetic_operators.hpp.
constexpr modulus_type gears::functional::modulus {} |
Effectively calls operator%
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | left parameter to mod |
u | right parameter to mod |
t % u
Definition at line 132 of file arithmetic_operators.hpp.
constexpr multiplies_type gears::functional::multiplies {} |
Effectively calls operator*
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | left parameter to multiply |
u | right parameter to multiply |
t * u
Definition at line 104 of file arithmetic_operators.hpp.
constexpr not_equal_to_type gears::functional::not_equal_to {} |
Effectively calls operator!=
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | left side to compare |
u | right side to compare |
t != u
Definition at line 97 of file comparison_operators.hpp.
constexpr odd_type gears::functional::odd {} |
Checks if a numeric instance is odd by effectively checking if t % 2 != 0
.
t | numeric type to check |
t % 2 != 0
, usually bool. Definition at line 65 of file numeric_properties.hpp.
constexpr plus_type gears::functional::plus {} |
Effectively calls operator+
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | left parameter to add |
u | right parameter to add |
t + u
Definition at line 76 of file arithmetic_operators.hpp.
constexpr rshift_type gears::functional::rshift {} |
Effectively calls operator>>
on two variables in a generic manner. This is an instance of a function object and could be called just like a regular function.
t | left parameter to right shift |
u | right parameter to right shift |
t >> u
Definition at line 158 of file bitwise_operators.hpp.