diff --git a/src/c2py/converters/stl/any.hpp b/src/c2py/converters/stl/any.hpp index 4c87609..28b7d40 100644 --- a/src/c2py/converters/stl/any.hpp +++ b/src/c2py/converters/stl/any.hpp @@ -44,7 +44,7 @@ namespace c2py { static bool is_convertible(PyObject *ob, bool raise_exception) { if (!base_t::is_convertible(ob, raise_exception)) return false; - return base_t::py2c(ob).type() == std::type_index(typeid(T)); + return base_t::py2c(ob).type() == typeid(T); } static T &py2c(PyObject *ob) { return std::any_cast(base_t::py2c(ob)); }