class A
{
private:
explicit A( int i ) {}
A( const A& );
public:
static const A arr[2];
};
const A A::arr[] = { A(0), A(1) };
int main ()
{}
Consider the above code and note that the copy ctor for A has been
declared but not defined. gcc reports a link error to the copy ctor
which I assume means that it's trying to initialize "arr" by copying the
temporaries A(0) and A(1). Is there another way to initialize this
array without defining the copy ctor?
-Mark