interposed.cpp 411 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright 2022 Yury Gribov
  3. *
  4. * The MIT License (MIT)
  5. *
  6. * Use of this source code is governed by MIT license that can be
  7. * found in the LICENSE.txt file.
  8. */
  9. #include <stdio.h>
  10. #define VIS __attribute__((visibility("default")))
  11. class VIS A {
  12. public:
  13. virtual void foo(int x, int y);
  14. };
  15. void A::foo(int x, int y) {
  16. printf("A::foo: %d\n", x + y);
  17. }
  18. void foo(int x) {
  19. printf("foo: %d\n", x);
  20. }