Template Struct remove_pointer

Struct Documentation

template<class T>
struct remove_pointer

Type traits for deducing the data type of T from a pointer or smart pointer.

In comparison to the existing type trait for pointer in the stdlib std::remove_pointer<T> https://en.cppreference.com/w/cpp/types/remove_pointer this trait is enhancing it for checking of smart pointer types as well. The valid pointer types are T*, std::shared_pointer<T> and std::unique_ptr<T>

Public Types

using type = typename details::remove_pointer<typename std::remove_reference<T>::type, details::is_smart_pointer<T>::value>::type