Like @RMatin says. But you could overload operator!
bool operator!(E e) {
return e == static_cast<E>(0);
}
So that you can use the !!e
idiom
if(!!e) {
...
}
Like @RMatin says. But you could overload operator!
bool operator!(E e) {
return e == static_cast<E>(0);
}
So that you can use the !!e
idiom
if(!!e) {
...
}