mirror of
https://github.com/opnsense/src.git
synced 2026-02-21 08:50:22 -05:00
26 lines
739 B
C++
26 lines
739 B
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
// Source Licenses. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// UNSUPPORTED: libcpp-has-no-threads
|
|
|
|
// <mutex>
|
|
|
|
// This test does not define _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS so it
|
|
// should compile without any warnings or errors even though this pattern is not
|
|
// understood by the thread safety annotations.
|
|
|
|
#include <mutex>
|
|
|
|
int main() {
|
|
std::mutex m;
|
|
m.lock();
|
|
{
|
|
std::unique_lock<std::mutex> g(m, std::adopt_lock);
|
|
}
|
|
}
|