|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-08-08 07:53:14
Johan Råde wrote:
> John Maddock wrote:
>> That one is problematic as it really would make the array a non-POD
>> so initialisation would occur during the dynamic phase rather than
>> the static phase.
The compiler is allowed to statically initialize anything it can, and in
this case VC 7.1 does.
>> IMO that would be a deal braker :-(
We aren't actually testing static array initialization, are we? How do we
know that it works at all? :-)
> So an array class with a non-template assignment op
> is an aggregate but is not a POD.
> This language sometimes drives me nuts ;-)
Non-POD aggregates are common, consider
struct X
{
std::string a, b;
};
X x = { "a", "b" };
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net