Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2006-11-20 18:29:01


Michael Marcin wrote:
> Hi,
>
> I've been toying around with the idea of using fusion in my geometry
> library (at least that seems to be the terminology in use around here).
> I started reading the documentation and I ran into a problem with the
> firs thing I tried to do.
>
[...]
>
> fails to compile with:

[...]
>
> changing deref::call from:
> return it.array[Iterator::index::value];
> to:
> return it.array.at( Iterator::index::value );
>
> causes it to compile so I'm thinking it is a compiler bug that needs to
> be worked around.

It is indeed a compiler bug, but I think there's more to it than that.
With your fix, VC7.1 complains: boost\array.hpp(159) : error C3861:
'size': identifier not found, even with argument-dependent lookup
while VC8 is ok. This is not a problem on any other compiler though.
Also, it's funny that the fusion test for array is also ok. I noted
that the thing that's causing problems is the header include:

     #include <boost/array.hpp>
     #include <boost/fusion/iterator.hpp>
     #include <boost/fusion/sequence.hpp>

Changing this to

     #include <boost/array.hpp>
     #include <boost/fusion/sequence/adapted/array.hpp>
     #include <boost/fusion/sequence/intrinsic.hpp>

makes VC++ happy.

I'll investigate further...

Regards,

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

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