libstdc++: Make std::atomic_flag::test members const
authorJonathan Wakely <jwakely@redhat.com>
Fri, 12 Jun 2020 09:22:05 +0000 (10:22 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 12 Jun 2020 09:31:07 +0000 (10:31 +0100)
commit17412a74c531a21595311df5428f26552e82dfa8
tree2617ccc1d5ae629d58dd10285bf1ed817a215680
parenta6db99a61a86814241b66a17a65633338d86cc17
libstdc++: Make std::atomic_flag::test members const

Also fix the tests so they run without an explicit -std=gnu++2a in the
RUNTESTFLAGS, and test the new function on const-qualified objects.

* include/bits/atomic_base.h (atomic_flag::test): Add missing
const qualifiers.
* testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
dg-options and verify results of test function.
* testsuite/29_atomics/atomic_flag/test/implicit.cc: Likewise.
libstdc++-v3/include/bits/atomic_base.h
libstdc++-v3/testsuite/29_atomics/atomic_flag/test/explicit.cc
libstdc++-v3/testsuite/29_atomics/atomic_flag/test/implicit.cc