I\'m wondering, if there is a way to check at compile time whether a type T of some iterator type is a const_iterator, or not. Is there some difference in the types that ite
With C++11, the new standard header provides std::is_const, so Nawaz's solution can be simplified:
std::is_const
template struct is_const_iterator { typedef typename std::iterator_traits::pointer pointer; static const bool value = std::is_const::type>::value; };