]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | // Copyright 2021 Andrey Semashev |
2 | ||
3 | // Distributed under the Boost Software License, Version 1.0. | |
4 | // See http://www.boost.org/LICENSE_1_0.txt | |
5 | ||
6 | // See library home page at http://www.boost.org/libs/filesystem | |
7 | ||
8 | #include <atomic> | |
9 | ||
10 | typedef void func_t(); | |
11 | ||
12 | int main() | |
13 | { | |
14 | func_t* func = 0; | |
15 | std::atomic_ref< func_t* > ref(func); | |
16 | ref.load(std::memory_order_relaxed); | |
17 | ref.store((func_t*)0, std::memory_order_relaxed); | |
18 | return 0; | |
19 | } |