[cpp-threads] Weak vs Strong Atomics

Lawrence Crowl Lawrence at Crowl.org
Thu May 3 22:02:26 BST 2007


On 5/3/07, Roger Orr <rogero at howzatt.demon.co.uk> wrote:
> cpp-threads-bounces at decadentplace.org.uk wrote:
> > "Roger Orr" <rogero at howzatt.demon.co.uk> wrote:
> >>
> >> So could we:
> >> - declare struct atomic_int as a pretty nearly raw struct in both C
> >> and C++
> >
> > No.  It MUST be an opaque type, at least in C.  Make it a
> > struct, and it becomes defined behaviour to unpick it.
> >
> > Unless I have misunderstood what you are saying, which seems quite
> > likely!
> >
>
> An opaque type is fine.
> (It's just currently shown as a struct in Lawrence's paper and in
> new_atomic.c on the Wiki)

It had to be a struct from the C++ side in order to derive from it,
but N2145 points out that it should be treated as an opaque type.

-- 
Lawrence Crowl



More information about the cpp-threads mailing list