This is the mail archive of the
mailing list for the libstdc++ project.
Re: Deprecating arithmetic on std::atomic<void*>
On 04/20/2017 10:39 AM, Jonathan Wakely wrote:
> Or simply deprecate support for it in std::atomic. **If** the
> extension for built-in types is useful then I can imagine it might be
> useful to have it for std::atomic too, for a subset of the programs
> relying on the original extension. But I'm unconvinced how useful
> the original extension is. There are other ways to achieve it if
> absolutely necessary, e.g. convert the void* to uintptr_t and perform
> the arithmetic and use compare_exchange to store it back again.
This comes from a completely different angle, but,
if P0146R1 (Regular void)  manages to follow through, then that
makes GCC's extension for built-in types be standard, AFAICS.
AFAIK, the author is still pushing for the proposal aiming at C++20 .
 - http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0146r1.html
 - <https://channel9.msdn.com/Shows/CppCast/Episode-83-Regular-Void-with-Matt-Calabrese>,
end of last Feb, at min 14 onward.
( Please don't shoot the messenger. :-) )