Use std::scoped_lock only for C++17 and newer
This fixes a test failure caused by D53049. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344192 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -25,8 +25,10 @@ std::mutex m;
|
||||
int foo __attribute__((guarded_by(m)));
|
||||
|
||||
static void scoped() {
|
||||
#if __cplusplus >= 201703L
|
||||
std::scoped_lock<std::mutex> lock(m);
|
||||
foo++;
|
||||
#endif
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
||||
Reference in New Issue
Block a user