Lea el resto »
bool flag; bool bug; ... return ( flag != bug ) ? true : false;
Fuente: Matias Iacono Blog