C++ Logo

std-proposals

Advanced search

Re: [std-proposals] std::atomic_pointer_pair

From: Thiago Macieira <thiago_at_[hidden]>
Date: Fri, 09 Jan 2026 08:58:27 -0300
On Friday, 9 January 2026 07:32:32 Brasilia Standard Time Frederick Virchanza
Gotham via Std-Proposals wrote:
> In choosing the name for the type "atomic_pointer_pair", the 'pointer'
> part really just means "the register width". That's why the member
> functions of atomic_pointer_pair will allow you to access either of
> the pointers as intptr_t, so that when you're writing a lockfree
> container you can have "pointer + counter".

And why wouldn't a plain struct of the same size suffice?

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel Data Center - Platform & Sys. Eng.

Received on 2026-01-09 11:58:39