Problem with Array::swapWithArray and CriticalSection

The declaration of Array::swapWithArray indicates that it can be used to swap the content also between different types of Arrays:

template <class OtherArrayType> void swapWithArray (OtherArrayType& otherArray) throw()

But in the following example, I get errors because the lock and other members of Array<short, CriticalSection> are private int method body of Array::swapWithArray.

void swapWithArray(Array<short, CriticalSection> &array1, Array<short> &array2) { array1.swapWithArray(array2); }

Have I missed something
Greetings Jan

No, it’s got to be the same type of array - it’s for swapping their contents over.