Elegant way for a recursive C++ template to do something different with the leaf class?
- by Costas
I have a C++ class template that makes an Array of pointers. This also gets typedefed to make Arrays of Arrays and so on:
typedef Array<Elem> ElemArray;
typedef Array<ElemArray> ElemArrayArray;
typedef Array<ElemArrayArray> ElemArrayArrayArray;
I would like to be able to set one leaf node from another by copying…