Boost logo

Boost Users :

From: Tarjei Knapstad (tarjeik_at_[hidden])
Date: 2003-05-16 03:09:36


I get some weird error messages which I don't really understand when I
tried using mpl::pop_back today. The following example (more or less an
exact copy of the one in the documentation):

------------------ start code -----------------

#include <boost/mpl/list.hpp>
#include <boost/mpl/pop_back.hpp>

using namespace boost::mpl;

void f()
{
    typedef list<int, double>::type ListType;
    typedef pop_back<ListType>::type PoppedList;
}

------------------ end code ----------------------

fails on gcc 3.2 (Boost 1.30) with:

pop_back.cpp: In instantiation of `boost::mpl::pop_back<f()::ListType>':
pop_back.cpp:9: instantiated from here
pop_back.cpp:9: base class `
  
boost::mpl::pop_back_traits<boost::mpl::aux::list_tag>::algorithm<f()::ListType>
   ' has incomplete type
pop_back.cpp: In function `void f()':
pop_back.cpp:9: ISO C++ forbids declaration of `type' with no type
pop_back.cpp:9: typedef name may not be class-qualified
pop_back.cpp:9: parse error before `;' token

I'd appreciate if someone could clear this up for me.

Regards,

--
Tarjei

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net