aboutsummaryrefslogtreecommitdiffstats
path: root/deps/sol2/examples/source/docs/inheritance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'deps/sol2/examples/source/docs/inheritance.cpp')
-rw-r--r--deps/sol2/examples/source/docs/inheritance.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/deps/sol2/examples/source/docs/inheritance.cpp b/deps/sol2/examples/source/docs/inheritance.cpp
deleted file mode 100644
index b1c87f0..0000000
--- a/deps/sol2/examples/source/docs/inheritance.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#define SOL_ALL_SAFETIES_ON 1
-#include <sol/sol.hpp>
-
-struct A {
- int a = 10;
- virtual int call() { return 0; }
- virtual ~A(){}
-};
-struct B : A {
- int b = 11;
- virtual int call() override { return 20; }
-};
-
-int main (int, char*[]) {
-
- sol::state lua;
-
- lua.new_usertype<B>( "A",
- "call", &A::call
- );
-
- lua.new_usertype<B>( "B",
- "call", &B::call,
- sol::base_classes, sol::bases<A>()
- );
-
- return 0;
-}