Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-01-04 16:18:19


[I posted this message last week. I know people are busy, so I don't expect
immediate bug fixes or long explanations, particularly since I found a
workaround some time ago for my intended application. But if I am wrong that
the described behavior represents a bug of some sort, I'd like to know.]

I have found that some MPL algorithms and metafunctions fail to compile on
como 4.3.3 when applied to sequences containing certain lambda expressions.
The simplest example is:

    BOOST_STATIC_ASSERT( !empty< list< deref<_> > >::value );

Almost every computation I have tried on sequences containing deref<_> fail.
The output in the above case is shown below.

Thanks,

Jonathan

[Note: The above works fine on a number of other compilers(VC7.1, GCC 3.2,
Intel 7.1) and it works on como with a simple hand-rolled typelist.]

-----------------------------------------------------------

<file>, line 32: error:
      class "boost::mpl::arg<-1>" has no member "type"
      typedef typename Iterator::type type;
                                 ^
          detected during:
            instantiation of class "boost::mpl::deref<Iterator> [with
                      Iterator=boost::mpl::_]" at line 23 of
                      "<directory>\boost-1.30.2\boost/m
                      pl/aux_/has_tag.hpp"
            instantiation of class "boost::mpl::aux::has_tag<T> [with
                      T=boost::mpl::list<boost::mpl::deref<boost::mpl::_>,
                      boost::mpl::void_, boost::mpl::void_,
boost::mpl::void_,
                      boost::mpl::void_, boost::mpl::void_,
boost::mpl::void_,
                      boost::mpl::void_, boost::mpl::void_,
                      boost::mpl::void_>]" at line 114 of
                      "<directory>\boost-1.30.2\boost/m
                      pl/sequence_tag.hpp"
            instantiation of class "boost::mpl::sequence_tag<Sequence> [with

Sequence=boost::mpl::list<boost::mpl::deref<boost::mpl::_
>, boost::mpl::void_, boost::mpl::void_,
                      boost::mpl::void_, boost::mpl::void_,
boost::mpl::void_,
                      boost::mpl::void_, boost::mpl::void_,
boost::mpl::void_,
                      boost::mpl::void_>]" at line 33 of
                      "<directory>\boost-1.30.2\boost/m
                      pl/empty.hpp"
            instantiation of class "boost::mpl::empty<Sequence> [with

Sequence=boost::mpl::list<boost::mpl::deref<boost::mpl::_
>, boost::mpl::void_, boost::mpl::void_,
                      boost::mpl::void_, boost::mpl::void_,
boost::mpl::void_,
                      boost::mpl::void_, boost::mpl::void_,
boost::mpl::void_,
                      boost::mpl::void_>]" at line 195 of
                      "<directory>\C++\metafunction\libs\mpl\mft\
                      test\test.cpp"


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