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
ad7bc01d
Commit
ad7bc01d
authored
Oct 20, 2015
by
Wenzel Jakob
Browse files
fix build on linux
parent
436b7318
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
include/pybind11/cast.h
include/pybind11/cast.h
+2
-2
No files found.
include/pybind11/cast.h
View file @
ad7bc01d
...
@@ -197,11 +197,11 @@ public:
...
@@ -197,11 +197,11 @@ public:
}
}
operator
type
*
()
{
return
(
type
*
)
value
;
}
operator
type
*
()
{
return
(
type
*
)
value
;
}
operator
type
&
()
{
return
(
type
&
)
*
value
;
}
operator
type
&
()
{
return
*
(
(
type
*
)
value
)
;
}
protected:
protected:
template
<
typename
T
=
type
,
typename
std
::
enable_if
<
std
::
is_copy_constructible
<
T
>
::
value
,
int
>::
type
=
0
>
template
<
typename
T
=
type
,
typename
std
::
enable_if
<
std
::
is_copy_constructible
<
T
>
::
value
,
int
>::
type
=
0
>
static
void
*
copy_constructor
(
const
void
*
arg
)
{
static
void
*
copy_constructor
(
const
void
*
arg
)
{
return
new
type
((
const
type
&
)
*
arg
);
return
new
type
(
*
(
(
const
type
*
)
arg
)
)
;
}
}
template
<
typename
T
=
type
,
typename
std
::
enable_if
<!
std
::
is_copy_constructible
<
T
>
::
value
,
int
>::
type
=
0
>
template
<
typename
T
=
type
,
typename
std
::
enable_if
<!
std
::
is_copy_constructible
<
T
>
::
value
,
int
>::
type
=
0
>
static
void
*
copy_constructor
(
const
void
*
)
{
return
nullptr
;
}
static
void
*
copy_constructor
(
const
void
*
)
{
return
nullptr
;
}
...
...
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