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
29b5064e
Commit
29b5064e
authored
Sep 13, 2016
by
Wenzel Jakob
Committed by
GitHub
Sep 13, 2016
Browse files
Merge pull request #411 from jagerman/debug-build-and-fix
Debug build and fix
parents
591a9999
4a4fb396
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
.travis.yml
.travis.yml
+2
-1
include/pybind11/cast.h
include/pybind11/cast.h
+1
-1
No files found.
.travis.yml
View file @
29b5064e
...
...
@@ -19,7 +19,7 @@ matrix:
env
:
PYTHON=2.7 CPP=14 GCC=6
-
sudo
:
true
services
:
docker
env
:
PYTHON=3.5 CPP=14 GCC=6
env
:
PYTHON=3.5 CPP=14 GCC=6
DEBUG=1
-
os
:
osx
osx_image
:
xcode7.3
env
:
PYTHON=2.7 CPP=14 CLANG
...
...
@@ -59,6 +59,7 @@ before_install:
fi
if [ -n "$CPP" ]; then export CPP=-std=c++$CPP; fi
if [ "${PYTHON:0:1}" = "3" ]; then export PY=3; fi
if [ -n "$DEBUG" ]; then export CMAKE_EXTRA_ARGS="-DCMAKE_BUILD_TYPE=Debug"; fi
-
|
# Initialize enviornment
if [ -n "$DOCKER" ]; then
...
...
include/pybind11/cast.h
View file @
29b5064e
...
...
@@ -864,7 +864,7 @@ template <typename type> using cast_is_temporary_value_reference = bool_constant
>
;
// Basic python -> C++ casting; throws if casting fails
template
<
typename
T
ypeCaster
>
T
ype
C
aster
&
load_type
(
T
ype
C
aster
&
conv
,
const
handle
&
handle
)
{
template
<
typename
T
,
typename
SFINAE
>
t
ype
_c
aster
<
T
,
SFINAE
>
&
load_type
(
t
ype
_c
aster
<
T
,
SFINAE
>
&
conv
,
const
handle
&
handle
)
{
if
(
!
conv
.
load
(
handle
,
true
))
{
#if defined(NDEBUG)
throw
cast_error
(
"Unable to cast Python instance to C++ type (compile in debug mode for details)"
);
...
...
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