Check for contiguous mutable storage. More...
#include <senf/Utils/IteratorTraits.hh>
Check for contiguous mutable storage.
This type trait returns true
, if RandomAccessIterator is an iterator into a contiguous storage area which may be written to. If this is the case, some algorithms may be optimized by directly modifying the underlying storage instead of relying on the STL interface.
Thie \ref senf::storage_iterator helper function will convert an iterator to a pointer to the same element the iterator is referencing. This trait will return \c true for pointers. Additionally it should be configured to return true for all standard containers which obey above implementation restrictions. This typically includes \c std::vector and \c std::basic_string. To do so, the template must be specialized for those containers \c iterator type. If compiling with g++, this is implemented in \ref IteratorTraits.ih. This file should be extended for further compilers or STL implementations if needed.
Definition at line 75 of file IteratorTraits.hh.