mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-24 14:15:11 +00:00
Build /permissive- under VS2017
Building with the (VS2017) /permissive- flag puts the compiler into stricter standards-compliant mode. It shouldn't cause the compiler to work differently--it just disallows some non-conforming code--so should be perfectly fine for the test suite under all VS2017 builds. This commit also fixes one failure under non-permissive mode.
This commit is contained in:
parent
a28393cf7b
commit
6519388f5c
@ -34,6 +34,7 @@ install:
|
|||||||
if ($env:APPVEYOR_JOB_NAME -like "*Visual Studio 2017*") {
|
if ($env:APPVEYOR_JOB_NAME -like "*Visual Studio 2017*") {
|
||||||
$env:CMAKE_GENERATOR = "Visual Studio 15 2017"
|
$env:CMAKE_GENERATOR = "Visual Studio 15 2017"
|
||||||
$env:CMAKE_INCLUDE_PATH = "C:\Libraries\boost_1_64_0"
|
$env:CMAKE_INCLUDE_PATH = "C:\Libraries\boost_1_64_0"
|
||||||
|
$env:CXXFLAGS = "-permissive-"
|
||||||
} else {
|
} else {
|
||||||
$env:CMAKE_GENERATOR = "Visual Studio 14 2015"
|
$env:CMAKE_GENERATOR = "Visual Studio 14 2015"
|
||||||
}
|
}
|
||||||
|
@ -1417,7 +1417,7 @@ protected:
|
|||||||
bool load_value(value_and_holder &&v_h) {
|
bool load_value(value_and_holder &&v_h) {
|
||||||
if (v_h.holder_constructed()) {
|
if (v_h.holder_constructed()) {
|
||||||
value = v_h.value_ptr();
|
value = v_h.value_ptr();
|
||||||
holder = v_h.holder<holder_type>();
|
holder = v_h.template holder<holder_type>();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
throw cast_error("Unable to cast from non-held to held instance (T& to Holder<T>) "
|
throw cast_error("Unable to cast from non-held to held instance (T& to Holder<T>) "
|
||||||
|
Loading…
Reference in New Issue
Block a user