0
How to call operator bool() explicitly from my object ?
I want to call operator bool() explicitly from my object The code is pasted below. https://code.sololearn.com/c68xH3k0z6SY/?ref=app
1 Réponse
0
static_cast<bool>( a );
or the C style (bool)a
You can also mark operator bool as explicit to force this.