
Hi Alisdair, On Mon, 29 Jan 2007 07:56:12 +0000 (UTC), "AlisdairM" <alisdair.meredith@uk.renaultf1.com> said:
Christopher Kohlhoff wrote:
It doesn't? I was under the impression that array<T> only required that T be CopyConstructible, unlike vector<T> which also requires T be Assignable.
The basic problem is that the following is not legal C++:
strict bad { const int x; };
If a class contains const non-static members, they must have a user-declared default constructor, so this basically rules out PODs or any type with trivial default constructor.
It is annoying, because even though 'bad' looks safe to use with aggregate initialization, it is not allowed.
Hmmm, weird. Do you happen to have the relevant section number in the standard handy? Cheers, Chris