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:
Jason Rhinelander 2016-09-12 16:21:40 -04:00
parent 5b4968df3a
commit 4a4fb396e7

View File

@ -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 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 defined(NDEBUG)
throw cast_error("Unable to cast Python instance to C++ type (compile in debug mode for details)");