mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2025-03-04 01:37:53 +00:00
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:
parent
697faed467
commit
c4edc5a912
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user