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
9077bcd1
Commit
9077bcd1
authored
Jan 26, 2021
by
Ralf W. Grosse-Kunstleve
Browse files
Explicitly define copy/move constructors/assignments.
parent
63fe9891
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
tests/test_class_sh_inheritance.cpp
tests/test_class_sh_inheritance.cpp
+6
-0
No files found.
tests/test_class_sh_inheritance.cpp
View file @
9077bcd1
...
@@ -13,6 +13,12 @@ struct base_template {
...
@@ -13,6 +13,12 @@ struct base_template {
virtual
~
base_template
()
=
default
;
virtual
~
base_template
()
=
default
;
virtual
int
id
()
const
{
return
base_id
;
}
virtual
int
id
()
const
{
return
base_id
;
}
int
base_id
;
int
base_id
;
// Some compilers complain about implicitly defined versions of some of the following:
base_template
(
const
base_template
&
)
=
default
;
base_template
(
base_template
&&
)
=
default
;
base_template
&
operator
=
(
const
base_template
&
)
=
default
;
base_template
&
operator
=
(
base_template
&&
)
=
default
;
};
};
using
base
=
base_template
<
100
>
;
using
base
=
base_template
<
100
>
;
...
...
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