when the program is being executed. As well as the work done by thecompiler, this may include macro preprocessing as done bycppfor example. The final stage of program construction, performed by thelinker, would generally also be classed as compile time but might be distinguished as link time...
No... because MyArray<6> and MyArray<9> are different types. You could do that with polymorphism, but it would be a little silly... it'd be better to just dynamically allocate the array. Can't use constexpr. Can't use STL. Can't use new. I'm compelled to ask why. Oct...
There are a lot of papers on different kinds of polymorphism and a lot of the systems are well described with formal semantics etc, so quite a lot can be implemented without too much effort: the real problem is deciding which things to implement. One of the things you cannot do easily ...
when the program is being executed. As well as the work done by thecompiler, this may include macro preprocessing as done bycppfor example. The final stage of program construction, performed by thelinker, would generally also be classed as compile time but might be distinguished as link time...