libzed 1.10.2
A general-purpose library for quick and simple data manipulation.
 
Loading...
Searching...
No Matches
templates.hpp File Reference

Utility template definitions to allow for simpler type restrictions. More...

#include <iterator>
#include <type_traits>

Go to the source code of this file.

Classes

struct  z::core::is_iterator< T, typename >
 The default specialization for types that are not iterators. More...
 
struct  z::core::is_iterator< T, std::void_t< decltype(std::begin(std::declval< T >()))> >
 Template specialization for types that are iterators. More...
 

Namespaces

namespace  z::core
 Section containing core functions and classes.
 

Typedefs

template<typename T >
using z::core::dereference = std::remove_const_t< std::remove_reference_t< decltype(*std::declval< decltype(std::declval< T >().begin())>())> >
 The type of the dereferenced value from an iterable. This is used to determine the type of value that the generator will std::optional.
 
template<typename T >
using z::core::iterator_value = std::remove_const_t< decltype(std::declval< T >().begin())>
 The type of the value that an iterator generates. This is used to determine the type of iterator that the generator will use.
 
template<typename T >
using z::core::const_iterator_value = decltype(std::declval< const T & >().begin())
 The type of a const iterator from a const reference to a container. This is used when iterating over a const reference to ensure proper const_iterator deduction.
 

Detailed Description

Utility template definitions to allow for simpler type restrictions.