[cpp-threads] RE: volatile, memory models, threads
Peter Dimov
pdimov at mmltd.net
Wed Mar 1 10:18:38 GMT 2006
Nick Maclaren wrote:
> ALL that is needed to allow an implementation to support any POD type
> as atomic is to allow it to add a lock flag to that object, but that
> means allowing an atomic type to be of different size to the
> unqualified type. This is already allowed in one section, except
> that the ability to lose qualifiers makes it unimplementable!
You keep saying that, but it simply isn't true. Objects of cv-qualified
types have the same representation and alignment as objects of the
cv-unqualified types (3.9.3/1), and representation in this context includes
size (3.9/4). And of course the ability to _add_ qualifiers, which is a
pretty basic part of the language (char* to char const*), also requires it,
not only the ability to lose them.
More information about the cpp-threads
mailing list