mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 15:12:01 +00:00
Fix build under debug mode
Take load_type by nested type_caster template arguments instead of by full type_caster type.
This commit is contained in:
parent
5b4968df3a
commit
4a4fb396e7
@ -864,7 +864,7 @@ template <typename type> using cast_is_temporary_value_reference = bool_constant
|
|||||||
>;
|
>;
|
||||||
|
|
||||||
// Basic python -> C++ casting; throws if casting fails
|
// Basic python -> C++ casting; throws if casting fails
|
||||||
template <typename TypeCaster> TypeCaster &load_type(TypeCaster &conv, const handle &handle) {
|
template <typename T, typename SFINAE> type_caster<T, SFINAE> &load_type(type_caster<T, SFINAE> &conv, const handle &handle) {
|
||||||
if (!conv.load(handle, true)) {
|
if (!conv.load(handle, true)) {
|
||||||
#if defined(NDEBUG)
|
#if defined(NDEBUG)
|
||||||
throw cast_error("Unable to cast Python instance to C++ type (compile in debug mode for details)");
|
throw cast_error("Unable to cast Python instance to C++ type (compile in debug mode for details)");
|
||||||
|
Loading…
Reference in New Issue
Block a user