[Bug 255720] std::memory_order::memory_order_seq_cst doesn't exist in c++2a when the standard says that it should exist
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun May 9 03:13:08 UTC 2021
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255720
Bug ID: 255720
Summary: std::memory_order::memory_order_seq_cst doesn't exist
in c++2a when the standard says that it should exist
Product: Base System
Version: 12.2-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: standards
Assignee: standards at FreeBSD.org
Reporter: yuri at freebsd.org
This code:
> #include <atomic>
>
> void f() {
> std::atomic<unsigned int> n;
> n.fetch_add(std::memory_order::memory_order_seq_cst);
> }
fails with -std=c++2a:
> x.cpp:10:33: error: no member named 'memory_order_seq_cst' in 'std::__1::memory_order'
> n.fetch_add(std::memory_order::memory_order_seq_cst);
> ~~~~~~~~~~~~~~~~~~~^
but succeeds with -std=c++17.
The standard doesn't say that this symbol is obsoleted in c++20:
https://en.cppreference.com/w/cpp/atomic/memory_order
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-standards
mailing list