2 ms·
Addable<T> should evaluate to bool, so you can actually use it with a plain if. But a plain if requires both true and false branches to type check and if your
by gpderetta 6y ago
Addable<T> should evaluate to bool, so you can actually use it with a plain if.
But a plain if requires both true and false branches to type check and if your T is not actually addable and you use operator+ in the true branch you will get a compilation error.
- sriram_sun 6y agoAah got it. Thank you!