brintos

brintos / llvm-project-archived public Read only

0
0
Text · 642 B · 0905f46 Raw
29 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// XFAIL: c++0310 11// <atomic>12 13// struct atomic_flag14 15// atomic_flag() = ATOMIC_FLAG_INIT;16 17#include <atomic>18#include <cassert>19 20#include "test_macros.h"21 22int main(int, char**)23{24    std::atomic_flag f = ATOMIC_FLAG_INIT;25    assert(f.test_and_set() == 0);26 27  return 0;28}29