Howard Hinnant | 770d1c4 | 2010-12-08 17:20:28 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 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 Roelofs | 8d86b2e | 2014-09-05 19:45:05 +0000 | [diff] [blame] | 9 | // |
| 10 | // UNSUPPORTED: libcpp-has-no-threads |
Howard Hinnant | 770d1c4 | 2010-12-08 17:20:28 +0000 | [diff] [blame] | 11 | |
| 12 | // <atomic> |
| 13 | |
| 14 | // #define ATOMIC_VAR_INIT(value) |
| 15 | |
| 16 | #include <atomic> |
Richard Smith | 9efdc0b | 2012-04-19 00:50:47 +0000 | [diff] [blame] | 17 | #include <type_traits> |
Howard Hinnant | 770d1c4 | 2010-12-08 17:20:28 +0000 | [diff] [blame] | 18 | #include <cassert> |
| 19 | |
| 20 | int main() |
| 21 | { |
| 22 | std::atomic<int> v = ATOMIC_VAR_INIT(5); |
| 23 | assert(v == 5); |
| 24 | } |