Monday, 2 September 2013

c++ identity operand for products

c++ identity operand for products

There is a generic way to get the identity operand for a sum. If T is a
type, then T{} returns this operand. T{} + T{} == T{} example: int{} == 0
Is there also a generic way in C++ to the the identity operand for products?

No comments:

Post a Comment