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:
Aaron Puchert 2018-10-10 22:05:33 +00:00
parent 336db68378
commit 0e192395f1
1 changed files with 2 additions and 0 deletions

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