I'm not sure why you would like the value_type OutputIterator, because there is no way to extract the value from the Output Iterator. However, the three plug-in adapter iterators define value_type as void and provide an element of type container_type , so you can return to value_type T::container_type if value_type of T rotated to be void .
(In the " value_type " section, I really mean std::iterator_traits<T::container_type>::value_type and std::iterator_traits<T>::value_type .)
Or you could just not try to use output iterators, as if they mattered :)
Edit: SFINAE is not required: (even without C ++ 11 symmetry)
template<typename U, typename T> struct helper {typedef U type;};
source share