#ifndef PYTHONIC_INCLUDE_BUILTIN_ISINSTANCE_HPP #define PYTHONIC_INCLUDE_BUILTIN_ISINSTANCE_HPP #include "pythonic/include/utils/functor.hpp" #include "pythonic/builtins/pythran/is_none.hpp" PYTHONIC_NS_BEGIN namespace types { class str; template struct isinstance : std::conditional::value, true_type, false_type> { }; // some specialization template <> struct isinstance { using type = true_type; }; template <> struct isinstance { using type = true_type; }; } namespace builtins { template typename types::isinstance< Obj, typename std::decay()())>::type>::type isinstance(Obj, Cls) { return {}; } DEFINE_FUNCTOR(pythonic::builtins, isinstance); } PYTHONIC_NS_END #endif