Hello. If I declare the following:
template<int a, int b, int SomeArray[]>
class DoSomething{
public:
..
..
..
I have no problems, and the compiler is quite happy, and my template
function works as expected. But I want to add in an array for my
template to act on. I change the first line to:
template<int MIDPOINT, int Key, int ArrayToSearch[]>
but I get the following error:
error: provided for 'template<int a, int b, int * SomeArrayclass
DoSomething'
Why do I get this error when I attempt to pass in an array? What can
I do to get rid of this error? Is there a correct way to pass arrays
around inside a template?
Thanks!
template<int a, int b, int SomeArray[]>
class DoSomething{
public:
..
..
..
I have no problems, and the compiler is quite happy, and my template
function works as expected. But I want to add in an array for my
template to act on. I change the first line to:
template<int MIDPOINT, int Key, int ArrayToSearch[]>
but I get the following error:
error: provided for 'template<int a, int b, int * SomeArrayclass
DoSomething'
Why do I get this error when I attempt to pass in an array? What can
I do to get rid of this error? Is there a correct way to pass arrays
around inside a template?
Thanks!
Comment