A library for working with phylogenetic and population genetic data.
v0.27.0
is_forward_iterator_tag_based< T, typename std::enable_if< std::is_base_of< std::forward_iterator_tag, typename std::iterator_traits< T >::iterator_category >::value >::type > Struct Template Reference

#include <genesis/utils/core/type_traits.hpp>

Inherits true_type.

Detailed Description

template<class T>
struct genesis::utils::is_forward_iterator_tag_based< T, typename std::enable_if< std::is_base_of< std::forward_iterator_tag, typename std::iterator_traits< T >::iterator_category >::value >::type >

Return whether a type is at least a forward iterator.

Usage example: static_assert( is_iterator_tag_based<int*>::value, "..." );

We use a conservative approach here, testing the iterator_category instead of just the type properties. For a property-based approach, see https://stackoverflow.com/a/26768887/4184258

See also
is_iterator_tag_based, is_input_iterator_tag_based, is_output_iterator_tag_based, is_forward_iterator_tag_based, is_bidirectional_iterator_tag_based, is_random_access_iterator_tag_based

Definition at line 177 of file type_traits.hpp.


The documentation for this struct was generated from the following file: