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:
parent
8653d62c37
commit
12fb9747a7
1 changed files with 16 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue