0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-02 21:59:02 +02:00

ircd::util: Add template to remove_all_pointers<T>.

This commit is contained in:
Jason Volk 2018-03-11 17:03:06 -07:00
parent 8653d62c37
commit 12fb9747a7

View file

@ -203,6 +203,22 @@ is_input_iterator()
return std::is_base_of<std::forward_iterator_tag, typename std::iterator_traits<It>::iterator_category>::value;
}
//
// Completing std::remove_pointer<>
//
template<class T>
struct remove_all_pointers
{
using type = T;
};
template<class T>
struct remove_all_pointers<T *>
{
using type = typename remove_all_pointers<T>::type;
};
/// Convenience loop to test std::is* on a character sequence
template<int (&test)(int) = std::isprint>
ssize_t