default.pass.cpp 666 B

12345678910111213141516171819202122232425262728
  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: libcpp-has-no-threads
  10. // <mutex>
  11. // class mutex;
  12. // mutex();
  13. #include <mutex>
  14. #include <type_traits>
  15. #include "test_macros.h"
  16. int main(int, char**)
  17. {
  18. static_assert(std::is_nothrow_default_constructible<std::mutex>::value, "");
  19. std::mutex m;
  20. ((void)m);
  21. return 0;
  22. }