35 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: no-threads10 11// <mutex>12 13// struct once_flag;14 15// constexpr once_flag() noexcept;16 17#include <mutex>18#include "test_macros.h"19 20int main(int, char**)21{22 {23 std::once_flag f;24 (void)f;25 }26#if TEST_STD_VER >= 1127 {28 constexpr std::once_flag f;29 (void)f;30 }31#endif32 33 return 0;34}35