fork(1) download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. struct A
  5. {
  6. virtual void f() = 0;
  7. };
  8.  
  9. struct B : A
  10. {
  11. void f() override {}
  12. };
  13.  
  14. int main()
  15. {
  16. const auto p = &B::f;
  17. const bool ok = sizeof(void *) == sizeof( p );
  18.  
  19. if ( !ok )
  20. std::cout << "Not OK";
  21.  
  22. return 0;
  23. }
Success #stdin #stdout 0s 4452KB
stdin
Standard input is empty
stdout
Not OK