Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2002-07-29 21:57:06


Jaap Suter wrote:
> I'm sorry if this actually belongs in the Boost user group
> instead of here,

Not yet (if it would ever), - until the library is under review, this list
is exactly the right place to post questions to.

> but I think the MPL is currently only
> being discussed in here.

Yep.

>
> Anyway, I'm having a few problems using the MPL. Here's what
> I have done.

[...]

> 4. Then I wrote the following code:
>
> typedef boost::mpl::vector< float, double > vars;
> typedef boost::mpl::push_back< vars, unsigned char >::type ext_vars;
> typedef boost::mpl::at_c< 2, ext_vars >::type third_var;
> BOOST_STATIC_ASSERT( (boost::is_same< double, third_var >::value) );
>
> 5. I compiled everything with Microsoft Visual Studio 7
> (.NET) , and got the
> following errors:
>
> c:\Development\Library\boost_1_28_0\boost\mpl\push_back.hpp(36) :
>
> error C2504:
> 'boost::mpl::push_back_traits<Tag>::algorithm<Sequence,T>' :
>
> base class undefined

[...]

> If anybody knows what I'm doing wrong, that would be great.
> AFAIK the MPL compile-matrix shows that VC-7 should
> compile my code.

Oh, sorry, I should have updated 'push_back' test (make it empty for now :).
The error is not VC 7.0 specific; it's the result of the interface change,
which, in its turn, is the result of a review comment. The change is that in
order to allow uniform insertion into any Extensible Sequence the family of
'vector' templates was gifted a 'push_front' operation - for the expense of
'push_back'. The "for the expense" part of the change is temporary - it's
perfectly possible to implement a vector that supports both 'push_front' and
'push_back', I just didn't have resources for that.

To summarise the above 'push_back' will be back soon :), but in the meantime
please ignore it.

>
> Sincerely,
>
> Jaap "hoping he didn't overlook a really obvious mistake" Suter

You didn't, sorry for a faulty test.

Aleksey


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