Boost logo

Boost Users :

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


Hi David,

I wasn't trying to add elements to a joint view. I am trying to make a joint
sequence of two other sequences. I first tried to obtain that from
joint_view but when that failed I tried using push_back to push each element
of the second sequence at the end of the first one. I thought about trying
mpl::copy but I am not sure if that is implemented either...

Thanks

-delfin

-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of David Abrahams
Sent: Monday, July 19, 2004 7:55 PM
To: boost-users_at_[hidden]
Subject: [Boost-users] Re: Mpl problem

"Arkadiy Vertleyb" <vertleyb_at_[hidden]> writes:

> "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."

Exactly. Like all other views, joint_view is not extensible. How
could you push_back onto a view, anyway? push_back is supposed to
return the same "kind" of sequence as its input, but you can't add an
element to a joint_view.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users

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