How to specify the size of a class array ?

pYro_65:

dc42:

pYro_65:
Nope, standard C++ requires types to be unique, therefore only one definition of code can ever be used to describe a type.

A templated class instantiated twice with different template parameters gives rise to two distinct types.

Yes, that is correct. My response was in regard to multiple instantiations with the same parameters. i.e. the same type.

My doubt is about code duplication when using a template class with the same parameters in two compilation units. E. g. I have to classes, each written with the usual header/cpp file separation. They both #include MPLArray.h and they both have a data member which is an implementation if the template class with the same parameters, say MPLArray<int, 10>.
The sketch #includes both classes header files, instantiates and uses one (global) object of each class.
Will the final executable contain only one instance of the MPLArrary<int, 10> code, or will there be code duplication ?