
18 Jun
2007
18 Jun
'07
11:03 a.m.
Vít Kasal wrote:
Hi,
I have a problem with using pop_front on an integral sequence.
pop_front< vector_c<T, c1, c2, ... cn> >::type
results in
vector<c2, ... cn>
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<T, c2, ... cn> >
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