Boost logo

Boost :

Subject: [boost] type of iterator_facade::value_type
From: Neal Becker (ndbecker2_at_[hidden])
Date: 2009-12-23 11:12:33


According to iterator_facade doc:

   typedef remove_const<Value>::type value_type;

Why remove_const? This makes it hard to detect if the resulting iterator
points to a const value.

In order to further adapt such an iterator, I needed to use the
reference type instead of the value type to detect constness:

      typename boost::is_const<
        typename boost::remove_reference<
          typename std::iterator_traits<BaseIterator>::reference
>::type
>::type,


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk