Я думаю, что нет, по крайней мере, не, если Ваш источник оптимизирован и т.д. Однако существуют некоторые макросы для gdb, который может осмотреть контейнеры STL для Вас:
http://sourceware.org/ml/gdb/2008-02/msg00064.html
Однако я не использую это, таким образом, YMMV
No need to specialize member function. In that answer used stand-alone structure. You're still free to use it in class member functions.
// stand-alone helper struct
template<typename T>
struct is_pointer { static const bool value = false; };
template<typename T>
struct is_pointer<T*> { static const bool value = true; };
// your class
class Class{
public:
template<typename T>
void Fun(T& variable) {
std::cout << "is it a pointer? " << is_pointer<T>::value << std::endl;
}
};
On the other hand, you could overload function:
class Class {
public:
template<typename T>
void Fun(T& variable) {
std::cout << "is it not a pointer! " << std::endl;
}
template<typename T>
void Fun(T*& variable) {
std::cout << "is it a pointer! " << std::endl;
}
};
Have a look at Boost.TypeTraits, together with Boost EnableIf.