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//===----------------------------------------------------------------------===//
9//
10// UNSUPPORTED: libcpp-has-no-threads
11
12// <atomic>
13
14// typedef enum memory_order
15// {
16//     memory_order_relaxed, memory_order_consume, memory_order_acquire,
17//     memory_order_release, memory_order_acq_rel, memory_order_seq_cst
18// } memory_order;
19
20#include <atomic>
21#include <cassert>
22
23int main()
24{
25    assert(std::memory_order_relaxed == 0);
26    assert(std::memory_order_consume == 1);
27    assert(std::memory_order_acquire == 2);
28    assert(std::memory_order_release == 3);
29    assert(std::memory_order_acq_rel == 4);
30    assert(std::memory_order_seq_cst == 5);
31    std::memory_order o = std::memory_order_seq_cst;
32    assert(o == 5);
33}
34