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
b670b770
Commit
b670b770
authored
Jan 20, 2016
by
Wenzel Jakob
Browse files
minor adjustment to detail::is_copy_constructible (fixes #70)
parent
88d1d041
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
include/pybind11/common.h
include/pybind11/common.h
+1
-1
No files found.
include/pybind11/common.h
View file @
b670b770
...
@@ -247,7 +247,7 @@ template <typename T, size_t N> struct intrinsic_type<T[N]> { typedef type
...
@@ -247,7 +247,7 @@ template <typename T, size_t N> struct intrinsic_type<T[N]> { typedef type
/** \brief SFINAE helper class to check if a copy constructor is usable (in contrast to
/** \brief SFINAE helper class to check if a copy constructor is usable (in contrast to
* std::is_copy_constructible, this class also checks if the 'new' operator is accessible */
* std::is_copy_constructible, this class also checks if the 'new' operator is accessible */
template
<
typename
T
>
struct
is_copy_constructible
{
template
<
typename
T
>
struct
is_copy_constructible
{
template
<
typename
T2
>
static
std
::
true_type
test
(
decltype
(
new
T2
(
std
::
declval
<
T2
>
()))
*
);
template
<
typename
T2
>
static
std
::
true_type
test
(
decltype
(
new
T2
(
std
::
declval
<
std
::
add_lvalue_reference
<
T2
>::
type
>
()))
*
);
template
<
typename
T2
>
static
std
::
false_type
test
(...);
template
<
typename
T2
>
static
std
::
false_type
test
(...);
static
const
bool
value
=
std
::
is_same
<
std
::
true_type
,
decltype
(
test
<
T
>
(
nullptr
))
>::
value
;
static
const
bool
value
=
std
::
is_same
<
std
::
true_type
,
decltype
(
test
<
T
>
(
nullptr
))
>::
value
;
};
};
...
...
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