|
Boost : |
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2007-01-11 08:40:05
Eric Niebler wrote:
> Thorsten Ottosen wrote:
>>>This is on HEAD, BTW.
>>
>>Fixed
>
>
> Thanks. You might want to add a test for this as well <nudge>.
Will don when I get some more time.
> While we're at it, this trivial code fails to compile on msvc-7.1:
>
> int rg[5] = {};
> boost::begin(rg);
>
> Clearly, it's a compiler bug. But the work-around is simple enough. In
> range/begin.hpp, the begin() overloads have the following signatures:
>
> template< class T >
> typename range_iterator<T>::type begin( T& r )
>
> template< class T >
> typename range_iterator<const T>::type begin( const T& r )
>
> If there were defined as follows:
>
> template< class T >
> typename range_mutable_iterator<T>::type begin( T& r )
>
> template< class T >
> typename range_const_iterator<T>::type begin( const T& r )
>
> .... the problem would go away, I think. Same is true for end(), size(),
Hm ... I don't recall vc7.1 having any problems with this before.
AFAICT, it has to do with mpl:
..\..\..\boost\range\iterator.hpp(33) : error C2039: 'type' : is not a
member of
'boost::mpl::eval_if_c<C,F1,F2>'
with
[
C=false,
F1=boost::range_const_iterator<boost::remove_const<wchar_t
[20]>::ty
pe>,
F2=boost::range_mutable_iterator<wchar_t [20]>
]
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk