forked from OSchip/llvm-project
Use std::scoped_lock only for C++17 and newer
This fixes a test failure caused by D53049. llvm-svn: 344192
This commit is contained in:
parent
336db68378
commit
0e192395f1
|
@ -25,8 +25,10 @@ std::mutex m;
|
||||||
int foo __attribute__((guarded_by(m)));
|
int foo __attribute__((guarded_by(m)));
|
||||||
|
|
||||||
static void scoped() {
|
static void scoped() {
|
||||||
|
#if __cplusplus >= 201703L
|
||||||
std::scoped_lock<std::mutex> lock(m);
|
std::scoped_lock<std::mutex> lock(m);
|
||||||
foo++;
|
foo++;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
|
Loading…
Reference in New Issue