Boost logo

Boost :

From: Brian Braatz (brianb_at_[hidden])
Date: 2005-05-05 22:52:00


Could it be as simple as missing the namespace on the is_sqeuence<>
call?

> -----Original Message-----
> From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]]
> On Behalf Of Joel
> Sent: Thursday, May 05, 2005 5:46 PM
> To: boost_at_[hidden]
> Subject: [boost] [MPL] is_sequence problem
>
> Hi,
>
> I have a problem with this code snippet:
>
> #include <boost/mpl/is_sequence.hpp>
>
> int
> main()
> {
> using boost::mpl::int_;
> using boost::mpl::is_sequence;
> bool b = is_sequence<int_<0> >::value;
> }
>
> VC7.1 complains:
>
> C:\dev\boost\boost\mpl\aux_\begin_end_impl.hpp(35) : error C2039:
> 'begin' : is not a member of 'boost::mpl::int_<N>'
> with
> [
> N=0
> ]
> C:\dev\boost\boost\mpl\begin_end.hpp(35) : see reference to
> class template instantiation
> 'boost::mpl::begin_impl<Tag>::apply<Sequence>' being compiled
> with
> [
> Tag=boost::mpl::begin<boost::mpl::int_<0>>::tag_,
> Sequence=boost::mpl::int_<0>
> ]
> C:\dev\boost\boost\mpl\is_sequence.hpp(94) : see reference to
> class template instantiation 'boost::mpl::begin<Sequence>' being
compiled
> with
> [
> Sequence=boost::mpl::int_<0>
> ]
> C:\dev\test\mpl_is_sequence.cpp(8) : see reference to class
> template instantiation 'boost::mpl::is_sequence<T>' being compiled
> with
> [
> T=boost::mpl::int_<0>
> ]
> C:\dev\boost\boost\mpl\aux_\begin_end_impl.hpp(35) : error C2955:
> 'boost::mpl::begin' : use of class template requires template argument
> list
> C:\dev\boost\boost\mpl\begin_end.hpp(38) : see declaration of
> 'boost::mpl::begin'
> C:\dev\boost\boost\mpl\begin_end.hpp(35) : error C2955:
> 'boost::mpl::begin' : use of class template requires template argument
> list
> C:\dev\boost\boost\mpl\begin_end.hpp(38) : see declaration of
> 'boost::mpl::begin'
> C:\dev\boost\boost\mpl\is_sequence.hpp(94) : error C3203: 'begin' :
> class template invalid as template argument for template parameter
'T',
> expected a real type
> >Exit code: 2
>
> Any hints? I am relying on is_sequence to return false in this case.
> Comeau and g++ throws up too.
>
> Regards,
> --
> Joel de Guzman
> http://www.boost-consulting.com
> http://spirit.sf.net
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


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