This compiles:
template< const int i_Elements > class myClass
{
private:
const int n_Elements;
unsigned long myVector [i_Elements];
public:
myClass () : n_Elements (i_Elements) {};
};
void setup ()
{
myClass<4> foo;
Serial.begin (115200);
Serial.println (sizeof foo, DEC);
}
void loop () {}
Output:
18