fork download
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4.  
  5. struct A{
  6. bool operator||(A * x){
  7. std::cout<<"operator||(A,A)"<<std::endl;
  8. return true;
  9. }
  10. A * operator*(){
  11. std::cout<<"operator*"<<std::endl;
  12. return NULL;
  13. }
  14. };
  15.  
  16.  
  17. int main(){
  18. A a;
  19. if(a || *a){
  20. std::cout<<"True"<<std::endl;
  21. }
  22. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
operator*
operator||(A,A)
True