I'd like to pass several arbitrary length integer sequences as non-type parameters to a template class, so the instantiation would look something like this:
Foo<Bar, {1,2,3,4}, {5,6,7}> foo;
Is there a simple way to do this, possibly with C++11?
*** EDIT Ok, here's a more specific situation:
#include <vector>
using std::vector;
void f(vector<int> const & vec1, vector<int> const & vec2) {
// do something with vec1 and vec2
}
template<MagicalSequenceType & seq1, MagicalSequenceType & seq2>
struct Foo {
Foo(){
f(vector<int>(seq1), vector<int>(seq2));
}
};
main(){
// I want to be able to do something like this:
// ideally with syntax this elegant but not necessary
Foo < {1,2,3,4}, {5,6,7} > foo;
}
This is a bit on a pseudocode level. I guess MagicalSequenceType is what I'm after, be it an actual type or some syntactic template trickery :)