Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
0b6cff3d
Commit
0b6cff3d
authored
Feb 18, 2016
by
Ben Pritchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for compilation/segfault problems with Intel (issue 94)
parent
f8584b63
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
include/pybind11/attr.h
+1
-1
include/pybind11/cast.h
+8
-1
No files found.
include/pybind11/attr.h
View file @
0b6cff3d
...
@@ -277,7 +277,7 @@ template <int Nurse, int Patient> struct process_attribute<keep_alive<Nurse, Pat
...
@@ -277,7 +277,7 @@ template <int Nurse, int Patient> struct process_attribute<keep_alive<Nurse, Pat
};
};
/// Ignore that a variable is unused in compiler warnings
/// Ignore that a variable is unused in compiler warnings
template
<
class
T
>
void
ignore_unused
(
const
T
&
)
{
}
inline
void
ignore_unused
(
const
int
*
)
{
}
/// Recursively iterate over variadic template arguments
/// Recursively iterate over variadic template arguments
template
<
typename
...
Args
>
struct
process_attributes
{
template
<
typename
...
Args
>
struct
process_attributes
{
...
...
include/pybind11/cast.h
View file @
0b6cff3d
...
@@ -519,9 +519,16 @@ public:
...
@@ -519,9 +519,16 @@ public:
explicit
operator
type
*
()
{
return
this
->
value
;
}
explicit
operator
type
*
()
{
return
this
->
value
;
}
explicit
operator
type
&
()
{
return
*
(
this
->
value
);
}
explicit
operator
type
&
()
{
return
*
(
this
->
value
);
}
explicit
operator
holder_type
&
()
{
return
holder
;
}
explicit
operator
holder_type
*
()
{
return
&
holder
;
}
explicit
operator
holder_type
*
()
{
return
&
holder
;
}
// Workaround for Intel compiler bug
// see pybind11 issue 94
#if defined(__ICC) || defined(__INTEL_COMPILER)
operator
holder_type
&
()
{
return
holder
;
}
#else
explicit
operator
holder_type
&
()
{
return
holder
;
}
#endif
static
handle
cast
(
const
holder_type
&
src
,
return_value_policy
policy
,
handle
parent
)
{
static
handle
cast
(
const
holder_type
&
src
,
return_value_policy
policy
,
handle
parent
)
{
return
type_caster_generic
::
cast
(
return
type_caster_generic
::
cast
(
src
.
get
(),
policy
,
parent
,
&
typeid
(
type
),
&
copy_constructor
,
&
src
);
src
.
get
(),
policy
,
parent
,
&
typeid
(
type
),
&
copy_constructor
,
&
src
);
...
...
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