[mpl]pop_front function on integral sequence
Hi,
I have a problem with using pop_front on an integral sequence.
pop_front< vector_c
On Mon, June 18, 2007 09:58, Vít Kasal wrote:
Hi,
I have a problem with using pop_front on an integral sequence.
pop_front< vector_c
>::type results in
vector
Is it intended behavior? Is there some way to get
vector_c
> Thanks Vit
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I think vector_c is implemented as vector< mpl::int_<c2>, ... mpl::int_<cn> >. May be you should try using iterator_range which will result in a view to your initial vector and probably have a better compiler performance. With Kind Regards, Ovanes Markarian
Vít Kasal wrote:
Hi,
I have a problem with using pop_front on an integral sequence.
pop_front< vector_c
>::type results in
vector
Really? It removes two elements - or is that just a typo?
Is it intended behavior?
Returning a 'vector' instead of a 'vector_c'? Yes, since 'vector_c' is just a "convenience wrapper" to create 'vector's. Removing two elements instead of one? No. That would be a bug.
Is there some way to get
vector_c
>
No. Why do you need it? You get a Random Access Sequence full of Integral Constants. Treat it as such and you don't need to rely on the identity of the template-id. Regards, Tobias
participants (3)
-
Ovanes Markarian
-
Tobias Schwinger
-
Vít Kasal