rcpputils
master
C++ API providing common utilities and data structures.
|
Type traits for deducing the data type of T from a pointer or smart pointer. More...
#include <pointer_traits.hpp>
Public Types | |
using | type = typename details::remove_pointer< typename std::remove_reference< T >::type, details::is_smart_pointer< T >::value >::type |
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>
using rcpputils::remove_pointer< T >::type = typename details::remove_pointer< typename std::remove_reference<T>::type, details::is_smart_pointer<T>::value>::type |