Boost logo

Boost Users :

From: Delfin Rojas (drojas_at_[hidden])
Date: 2004-07-20 14:21:51

Thanks for the explanation Arkadiy. I had the impression this was probably a
problem of stuff not been implemented yet. However since mpl documentation
talks about vector and push_back I thought it was there...

What I'm trying to do is make a variant that is a superset of another
variant. For that, I make an initial mpl sequence with the types of the
first variant and create it. Then I make a second list with the extra types
of the second variant. I would then like to create the second variant
passing the joint list of the first types sequence and second types
sequence. That is why I wanted to use joint_view. Then I thought I would
just push_back each of the second variant types to the first types sequence
but that failed too. Finally I am doing an insert at the end (essentially a
push_back but not quite).

Thanks again


-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Arkadiy Vertleyb
Sent: Monday, July 19, 2004 5:51 PM
To: boost-users_at_[hidden]
Subject: [Boost-users] Re: Mpl problem

"Delfin Rojas" <drojas_at_[hidden]> wrote

> I am having a problem with the mpl library and I wonder if someone could
> help me with it. Basically I am trying to get a joint_view of two
> mpl::vector types and I get an error message on mpl/clear.hpp saying
> clear_traits< Tag >
> ::template algorithm< Sequence >
> base class undefined.
> I tried including several of the mpl hpp files, the ones that seemed could
> have something to do with this problem but that didn't help. I also get a
> similar problem trying to use mpl::push_back. In this case I get
> push_back_traits< Tag >
> ::template algorithm< Sequence,T >
> Base class undefined.
> On the other hand mpl::push_front and mpl::insert compile beautifully.

The error messages you are getting basically say:

"This algorithm is undefined for this type of sequence."

I never used joint_view, but the push_back is currently not defined for the
mpl::vector. AFAIK, this is going to be corrected in the next version of
Boost (which is currently being put together).

Also, if you are trying to use push_back in combination with, say, fold,
this can be replaced with push_front in combination with fold_backward.



Boost-users mailing list

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at