fork download
  1.  
  2. class WindowAdapter {
  3. public:
  4. virtual ~WindowAdapter() = default;
  5. };
  6.  
  7.  
  8. class GlfwAdapter : public WindowAdapter {
  9. };
  10.  
  11. void foo(WindowAdapter* adapter) {}
  12. int main() {
  13. GlfwAdapter ga;
  14. foo(&ga); // Should compile without cast
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
Standard output is empty