Boost logo

Boost Users :

From: AlisdairM (alisdair.meredith_at_[hidden])
Date: 2006-08-07 14:32:19


John Maddock wrote:

> I think that's wrong (and yes, I've changed my mind several times,
> mostly thanks to the folks on this list!):
>
> "An aggregate is an array or a class (clause 9) with no user-declared
> constructors (12.1), no private or protected non-static data members
> (clause 11), no base classes (clause 10), and no virtual functions
> (10.3)."
>
> so assignment ops should be OK.
>
> However the change should be restricted to VC7.1 just to be sure.

Triple-checking, I believe you are correct. (and I have been through
this dance more than once over the last 18 months)

It does mean that array would never be a POD, and not be admissible in
unions. Those are lesser restrictions though, so I am less worried by
them.

In principle the proposed workaround should be doing exactly the same
as the implicitly declared copy-assignment operator, although it is
potentially less efficient - especially in the POD case.

The question is - should we make this the default behaviour - banning
POD-behaviour and unions; accept these restrictions on the MS compiler
only and deem such use non-portable; or specialize on MS only, purely
for the pointer-to-member case?

-- 
AlisdairM

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