-
Notifications
You must be signed in to change notification settings - Fork 1
arithmeticOperatorsForType::negate
Igor Zarzycki edited this page Feb 18, 2022
·
1 revision
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;
}