Is it possible for a class to declare an array which can be overridden with an array of a different length in a derived class? I know I could just use std::vector but it is for a performance critical stage of a game engine and since the lengths are known at compile time it seems like it should be possible to do it statically.
I am aiming for something like this, but without the impossible requirement of a member variable which is both virtual and static:
struct F {
  virtual static const size_t n;
  Signal[n] inputs;
  Signal getInput(size_t i)
  {
    if(i<n)
      return inputs[i];
  }
};
struct Binary : F {
  static const size_t n=2;
};
 
     
    