BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlb::TransformIterator_Traits< FUNCTOR, ITERATOR > Struct Template Reference

#include <bdlb_transformiterator.h>

Public Types

typedef bslmf::ResultType< FUNCTOR >::type ResultType
 
typedef bsl::iterator_traits< ITERATOR > BaseIteratorTraits
 Define the iterator traits class of the underlying iterator.
 
typedef bsl::conditional< bsl::is_reference< ResultType >::value, typenameBaseIteratorTraits::iterator_category, bsl::input_iterator_tag >::type iterator_category
 
typedef bsl::remove_cv< typenamebsl::remove_reference< ResultType >::type >::type value_type
 
typedef BaseIteratorTraits::difference_type difference_type
 
typedef bsl::remove_reference< ResultType >::type * pointer
 
typedef ResultType reference
 Define the remaining standard types of the transform iterator.
 

Detailed Description

template<class FUNCTOR, class ITERATOR>
struct bdlb::TransformIterator_Traits< FUNCTOR, ITERATOR >

This component-private class defines various types that are used in the implementation of the transform iterator.

Member Typedef Documentation

◆ BaseIteratorTraits

template<class FUNCTOR , class ITERATOR >
typedef bsl::iterator_traits<ITERATOR> bdlb::TransformIterator_Traits< FUNCTOR, ITERATOR >::BaseIteratorTraits

◆ difference_type

template<class FUNCTOR , class ITERATOR >
typedef BaseIteratorTraits::difference_type bdlb::TransformIterator_Traits< FUNCTOR, ITERATOR >::difference_type

◆ iterator_category

template<class FUNCTOR , class ITERATOR >
typedef bsl::conditional<bsl::is_reference<ResultType>::value,typenameBaseIteratorTraits::iterator_category,bsl::input_iterator_tag>::type bdlb::TransformIterator_Traits< FUNCTOR, ITERATOR >::iterator_category

Define the iterator category of the transform iterator. If the functor returns a reference type, we pass through the iterator category of the underlying iterator, otherwise we use the input iterator tag (because all the other tags require that dereferencing produces a reference).

◆ pointer

template<class FUNCTOR , class ITERATOR >
typedef bsl::remove_reference<ResultType>::type* bdlb::TransformIterator_Traits< FUNCTOR, ITERATOR >::pointer

◆ reference

template<class FUNCTOR , class ITERATOR >
typedef ResultType bdlb::TransformIterator_Traits< FUNCTOR, ITERATOR >::reference

◆ ResultType

template<class FUNCTOR , class ITERATOR >
typedef bslmf::ResultType<FUNCTOR>::type bdlb::TransformIterator_Traits< FUNCTOR, ITERATOR >::ResultType

Define the result type returned by the functor. This is not necessarily the same type as the dereference of the iterator. In C++03, the functor must have a result_type type member. The specializations below transform function pointers to bsl::function so this works for those types as well.

◆ value_type

template<class FUNCTOR , class ITERATOR >
typedef bsl::remove_cv<typenamebsl::remove_reference<ResultType>::type>::type bdlb::TransformIterator_Traits< FUNCTOR, ITERATOR >::value_type

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