arithmeticOperatorsForType::negate - HaxyM/crap GitHub Wiki
Defined in "crap/functional.d/arithmeticoperatorsfortype.h".
Defined in "crap/functional".
template <class Type>
struct arithmeticOperatorsForType
{
/*...*/
template <Type Value>
constexpr const static auto negate = negateValue <Type, Value> :: value;
/*...*/
};Member constant of arithmeticOperatorsForType. Stores value of negateValue (see negateValue) acting on type Type. Requires C++14 or higher language version.
-
Value1- value to be negated.
#include <crap/functional.d/arithmeticoperatorsfortype.h>
int main()
{
static_assert(crap :: arithmeticOperatorsForType <signed int> :: template negate<-42> == 42, "Minus -42 should be 42");
return 0;
}