diff --git a/include/pybind11/common.h b/include/pybind11/common.h index a63b7f5bf..2a00fa7dd 100644 --- a/include/pybind11/common.h +++ b/include/pybind11/common.h @@ -247,7 +247,7 @@ template struct intrinsic_type { typedef type /** \brief SFINAE helper class to check if a copy constructor is usable (in contrast to * std::is_copy_constructible, this class also checks if the 'new' operator is accessible */ template struct is_copy_constructible { - template static std::true_type test(decltype(new T2(std::declval())) *); + template static std::true_type test(decltype(new T2(std::declval::type>())) *); template static std::false_type test(...); static const bool value = std::is_same(nullptr))>::value; };