Neil Kirk Neil Kirk - 1 month ago 4x
C++ Question

Can std::remove_pointer be used to remove all indirection from pointer type?

Say that I have.. int, int*, int**, etc. Can I use std::remove_pointer or similar to get straight to type int? Thanks



template<typename T> struct remove_all {
    typedef T type;
template<typename T> struct remove_all<T*> {
    typedef typename remove_all<T>::type type;

std::remove_pointer itself isn't of that much use here.