fork(1) download
  1. class Foo
  2. {
  3. typedef void (Foo::*bool_type)() const;
  4. public:
  5. operator bool_type() const;
  6.  
  7. // other syntax
  8. void (Foo::* some_func () const) () const; // ok! named function
  9. void (Foo::* operator * () const) () const; // ok! operator *
  10. // void (Foo::* operator () const) () const; // error! typecasting operator
  11. };
  12.  
  13. int main ()
  14. {}
Success #stdin #stdout 0s 2892KB
stdin
Standard input is empty
stdout
Standard output is empty