-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathREADME.md
More file actions
45 lines (37 loc) · 1.14 KB
/
README.md
File metadata and controls
45 lines (37 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# inheritance
###### python3 inheritance
cd Boost-Python-Examples/Examples/inheritance
make
python3
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import inheritance
>>> base = inheritance.Base()
Default constructor of Base
>>> derived = inheritance.Derived()
Default constructor of Base
Deault constructor of Derived
>>> inheritance.b(base)
Function b(Base *)
>>> inheritance.b(derived)
Function b(Base *)
>>> inheritance.d(base)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Boost.Python.ArgumentError: Python argument types in
inheritance.d(Base)
did not match C++ signature:
d(Derived*)
>>> inheritance.d(derived)
Function d(Derived *)
>>> inheritance.factory()
Default constructor of Base
Deault constructor of Derived
<inheritance.Derived object at 0x7f24a17668a0>
>>> quit()
Destructor of Derived
Destructor of Base
Destructor of Base
Destructor of Derived
Destructor of Base