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
0b12f91f
Commit
0b12f91f
authored
Jul 07, 2016
by
Jason Rhinelander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only disable placement-new warning under gcc >= 6
Otherwise this would create unknown option warnings under g++ < 6.
parent
cae0e009
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
include/pybind11/pybind11.h
+2
-2
No files found.
include/pybind11/pybind11.h
View file @
0b12f91f
...
@@ -82,12 +82,12 @@ protected:
...
@@ -82,12 +82,12 @@ protected:
/* Store the capture object directly in the function record if there is enough space */
/* Store the capture object directly in the function record if there is enough space */
if
(
sizeof
(
capture
)
<=
sizeof
(
rec
->
data
))
{
if
(
sizeof
(
capture
)
<=
sizeof
(
rec
->
data
))
{
#if defined(__GNUG__) && !defined(__clang__)
#if defined(__GNUG__) && !defined(__clang__)
&& __GNUC__ >= 6
# pragma GCC diagnostic push
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wplacement-new"
# pragma GCC diagnostic ignored "-Wplacement-new"
#endif
#endif
new
((
capture
*
)
&
rec
->
data
)
capture
{
std
::
forward
<
Func
>
(
f
)
};
new
((
capture
*
)
&
rec
->
data
)
capture
{
std
::
forward
<
Func
>
(
f
)
};
#if defined(__GNUG__) && !defined(__clang__)
#if defined(__GNUG__) && !defined(__clang__)
&& __GNUC__ >= 6
# pragma GCC diagnostic pop
# pragma GCC diagnostic pop
#endif
#endif
if
(
!
std
::
is_trivially_destructible
<
Func
>::
value
)
if
(
!
std
::
is_trivially_destructible
<
Func
>::
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