piranha
0.10
|
Default functor for the implementation of piranha::math::negate(). More...
#include <piranha/math.hpp>
Public Member Functions | |
template<typename U , generic_enabler< U > = 0> | |
void | operator() (U &x) const |
Generic call operator. More... | |
template<typename U , integral_enabler< U > = 0> | |
void | operator() (U &x) const |
Call operator specialised for integral types. More... | |
Default functor for the implementation of piranha::math::negate().
This functor should be specialised via the std::enable_if
mechanism. Default implementation will assign to the input value its negation.
|
inline |
Generic call operator.
x = -x
is well-formed and U
is not a C++ integral type.The body of the operator is equivalent to:
The other overload of this operator is specialised for C++ integral types, and it behaves identically.
x | value to be negated. |
unspecified | any exception resulting from the in-place negation or assignment of x . |
|
inline |