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
6ca312b3
"git@developer.sourcefind.cn:gaoqiong/pybind11.git" did not exist on "dd57a34e2d653478bf0b6f3d54c7c0cae46f3364"
Commit
6ca312b3
authored
Sep 19, 2019
by
Samuel Debionne
Committed by
Wenzel Jakob
Sep 19, 2019
Browse files
Avoid infinite recursion in is_copy_constructible (#1910)
parent
c9f5a464
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
include/pybind11/cast.h
include/pybind11/cast.h
+3
-1
No files found.
include/pybind11/cast.h
View file @
6ca312b3
...
@@ -775,7 +775,9 @@ template <typename T, typename SFINAE = void> struct is_copy_constructible : std
...
@@ -775,7 +775,9 @@ template <typename T, typename SFINAE = void> struct is_copy_constructible : std
// so, copy constructability depends on whether the value_type is copy constructible.
// so, copy constructability depends on whether the value_type is copy constructible.
template
<
typename
Container
>
struct
is_copy_constructible
<
Container
,
enable_if_t
<
all_of
<
template
<
typename
Container
>
struct
is_copy_constructible
<
Container
,
enable_if_t
<
all_of
<
std
::
is_copy_constructible
<
Container
>
,
std
::
is_copy_constructible
<
Container
>
,
std
::
is_same
<
typename
Container
::
value_type
&
,
typename
Container
::
reference
>
std
::
is_same
<
typename
Container
::
value_type
&
,
typename
Container
::
reference
>
,
// Avoid infinite recursion
negation
<
std
::
is_same
<
Container
,
typename
Container
::
value_type
>>
>::
value
>>
:
is_copy_constructible
<
typename
Container
::
value_type
>
{};
>::
value
>>
:
is_copy_constructible
<
typename
Container
::
value_type
>
{};
#if !defined(PYBIND11_CPP17)
#if !defined(PYBIND11_CPP17)
...
...
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