Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
e763f046
Commit
e763f046
authored
May 18, 2018
by
Jason Rhinelander
Browse files
Base class destructor should be virtual
Fixes #1401
parent
ce9d6e2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tests/test_virtual_functions.cpp
tests/test_virtual_functions.cpp
+1
-1
No files found.
tests/test_virtual_functions.cpp
View file @
e763f046
...
@@ -17,7 +17,7 @@ public:
...
@@ -17,7 +17,7 @@ public:
ExampleVirt
(
int
state
)
:
state
(
state
)
{
print_created
(
this
,
state
);
}
ExampleVirt
(
int
state
)
:
state
(
state
)
{
print_created
(
this
,
state
);
}
ExampleVirt
(
const
ExampleVirt
&
e
)
:
state
(
e
.
state
)
{
print_copy_created
(
this
);
}
ExampleVirt
(
const
ExampleVirt
&
e
)
:
state
(
e
.
state
)
{
print_copy_created
(
this
);
}
ExampleVirt
(
ExampleVirt
&&
e
)
:
state
(
e
.
state
)
{
print_move_created
(
this
);
e
.
state
=
0
;
}
ExampleVirt
(
ExampleVirt
&&
e
)
:
state
(
e
.
state
)
{
print_move_created
(
this
);
e
.
state
=
0
;
}
~
ExampleVirt
()
{
print_destroyed
(
this
);
}
virtual
~
ExampleVirt
()
{
print_destroyed
(
this
);
}
virtual
int
run
(
int
value
)
{
virtual
int
run
(
int
value
)
{
py
::
print
(
"Original implementation of "
py
::
print
(
"Original implementation of "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment