C++11: extending std::is_pointer to std::shared_ptr
问题 I think about overloading std::is_pointer in C++11 to yield true for std::shared_ptr<T> as well, since the latter behaves very much as a T* . #include <type_traits> namespace std { template <typename T> struct is_pointer<shared_ptr<T>> : std::true_type {}; template <typename T> struct is_pointer<shared_ptr<T const>> : std::true_type {}; } I wonder why this overload has not already been included in the standard implementation. Is there a pitfall that I'm overlooking? As an alternative one