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:
Aaron Puchert 2018-10-10 22:05:33 +00:00
parent 697faed467
commit c4edc5a912

View File

@ -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() {