![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
Function object for performing negation. More...
Public Types | |
| using | argument_type = T |
| Type of the value to negate. | |
| using | result_type = T |
| Result type of invoking this object. | |
Public Member Functions | |
| template<class U = T, arene::base::constraints< std::enable_if_t<!is_integral_v< U > > > = nullptr> | |
| constexpr auto | operator() (T const &value) const noexcept(noexcept(-std::declval< T >())) -> T |
| Returns the negation of the value. | |
| template<class U = T, arene::base::constraints< std::enable_if_t< is_integral_v< U > > > = nullptr> | |
| constexpr auto | operator() (T const &value) const noexcept(noexcept(-std::declval< T >())) -> T |
| Returns the negation of the value. | |
Function object for performing negation.
| T | The type of the values |
result_type, first_argument type, and second_argument type. These aliases have been deprecated in C++17 and removed in C++20. | using std::negate< T >::argument_type = T |
Type of the value to negate.
| using std::negate< T >::result_type = T |
Result type of invoking this object.
|
inlineconstexprnoexcept |
Returns the negation of the value.
| U | Template parameter to enable constraints. |
| value | The value to negate |
operator- on value
|
inlineconstexprnoexcept |
Returns the negation of the value.
| U | Template parameter to enable constraints. |
| value | The value to negate |
operator- on value T. This avoids any warning for implicit conversion (present on gcc8).