
Thorsten Ottosen wrote:
shunsuke wrote:
Eric Niebler wrote:
Another(more generic?) workaround seems known.
template< class T > typename range_iterator< typename add_const<T>::type >::type some_algo(T const& rng) { // ... }
I prefer a macro to document this bug... http://tinyurl.com/y2wkq3 Well, this bug seems not only involved in Boost.Range. VC++7.1 users would need this workaround; everywhere 'T' is deduced as array type.
Oh man, I hate that compiler (and I love it too).
Shunsuke, may I include your code in the boost distribution? Of course you can.
If so, would the range library be an ok place to put it? I don't know for sure. Anyway it's not so complicated macro; wherever it is placed.
And is the name PSTADE_DEDUCED_CONST(T) really a good name ? (What about BOOST_RANGE_CONST_TYPE?) I of course follow your naming; I can't use english well :-)
Please note the workaround is not '::boost::add_const' but 'boost::add_const'. IIRC, the leftmost '::' would confuse VC++7.1 in weird situation. Regards, -- Shunsuke Sogame