| 1 |
//===----------------------------------------------------------------------===// |
| 2 |
// |
| 3 |
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 |
// See https://llvm.org/LICENSE.txt for license information. |
| 5 |
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 |
// |
| 7 |
//===----------------------------------------------------------------------===// |
| 8 |
// |
| 9 |
// UNSUPPORTED: no-threads |
| 10 |
// UNSUPPORTED: c++03, c++11, c++14 |
| 11 |
|
| 12 |
// <shared_mutex> |
| 13 |
|
| 14 |
// class shared_mutex; |
| 15 |
|
| 16 |
// shared_mutex(const shared_mutex&) = delete; |
| 17 |
|
| 18 |
#include <shared_mutex> |
| 19 |
|
| 20 |
int main(int, char**) |
| 21 |
{ |
| 22 |
std::shared_mutex m0; |
| 23 |
std::shared_mutex m1(m0); // expected-error {{call to deleted constructor of 'std::shared_mutex'}} |
| 24 |
|
| 25 |
return 0; |
| 26 |
} |