Мне интересно, если есть способ проверить во время компиляции, является ли тип T некоторого типа итератора const_iterator, или нет. Есть ли разница в типах, которые определяют итераторы (value_type, pointer,...) между итераторами и константными итераторами?
Я хотел бы добиться чего-то вроде этого:
typedef std::vector<int> T;
is_const_iterator<T::iterator>::value // is false
is_const_iterator<T::const_iterator>::value // is true