forked from boostorg/config
Correct usage of std::memory_order in test case.
Otherwise it fails in C++20.
This commit is contained in:
@ -21,11 +21,17 @@
|
|||||||
|
|
||||||
namespace boost_no_cxx11_hdr_atomic {
|
namespace boost_no_cxx11_hdr_atomic {
|
||||||
|
|
||||||
|
void consume(std::memory_order)
|
||||||
|
{}
|
||||||
|
|
||||||
int test()
|
int test()
|
||||||
{
|
{
|
||||||
std::memory_order m = static_cast<std::memory_order>(std::memory_order_relaxed | std::memory_order_consume | std::memory_order_acquire | std::memory_order_release
|
consume(std::memory_order_relaxed);
|
||||||
| std::memory_order_acq_rel | std::memory_order_seq_cst);
|
consume(std::memory_order_consume);
|
||||||
(void)m;
|
consume(std::memory_order_acquire);
|
||||||
|
consume(std::memory_order_release);
|
||||||
|
consume(std::memory_order_acq_rel);
|
||||||
|
consume(std::memory_order_seq_cst);
|
||||||
|
|
||||||
std::atomic<int> a1;
|
std::atomic<int> a1;
|
||||||
std::atomic<unsigned> a2;
|
std::atomic<unsigned> a2;
|
||||||
|
Reference in New Issue
Block a user