blob: 5fed691da26862b2ca9ac77a18c57a59b258d47b [file] [log] [blame]
Howard Hinnant770d1c42010-12-08 17:20:28 +00001//===----------------------------------------------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
Jonathan Roelofs8d86b2e2014-09-05 19:45:05 +00009//
10// UNSUPPORTED: libcpp-has-no-threads
Howard Hinnant770d1c42010-12-08 17:20:28 +000011
12// <atomic>
13
14// #define ATOMIC_VAR_INIT(value)
15
16#include <atomic>
Richard Smith9efdc0b2012-04-19 00:50:47 +000017#include <type_traits>
Howard Hinnant770d1c42010-12-08 17:20:28 +000018#include <cassert>
19
20int main()
21{
22 std::atomic<int> v = ATOMIC_VAR_INIT(5);
23 assert(v == 5);
24}