]>
Commit | Line | Data |
---|---|---|
94014ee9 ESR |
1 | // { dg-options "-std=gnu++2a" } |
2 | // { dg-do compile { target c++2a } } | |
3 | ||
8d9254fc | 4 | // Copyright (C) 2019-2020 Free Software Foundation, Inc. |
94014ee9 ESR |
5 | // |
6 | // This file is part of the GNU ISO C++ Library. This library is free | |
7 | // software; you can redistribute it and/or modify it under the | |
8 | // terms of the GNU General Public License as published by the | |
9 | // Free Software Foundation; either version 3, or (at your option) | |
10 | // any later version. | |
11 | // | |
12 | // This library is distributed in the hope that it will be useful, | |
13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | // GNU General Public License for more details. | |
16 | // | |
17 | // You should have received a copy of the GNU General Public License along | |
18 | // with this library; see the file COPYING3. If not see | |
19 | // <http://www.gnu.org/licenses/>. | |
20 | ||
21 | #include <atomic> | |
22 | ||
23 | void test01() | |
24 | { | |
25 | // Not global scoped, only namespace std. | |
26 | using memory_order; // { dg-error "expected nested-name-specifier" } | |
27 | constexpr auto relaxed = memory_order::relaxed; // { dg-error "has not been declared" } | |
28 | constexpr auto consume = memory_order::consume; // { dg-error "has not been declared" } | |
29 | constexpr auto acquire = memory_order::acquire; // { dg-error "has not been declared" } | |
30 | constexpr auto release = memory_order::release; // { dg-error "has not been declared" } | |
31 | constexpr auto acq_rel = memory_order::acq_rel; // { dg-error "has not been declared" } | |
32 | constexpr auto seq_cst = memory_order::seq_cst; // { dg-error "has not been declared" } | |
33 | } |