File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
test/std/thread/thread.mutex/thread.once/thread.once.callonce Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 1010#define _LIBCPP___CXX03___MUTEX_ONCE_FLAG_H
1111
1212#include < __cxx03/__config>
13+ #include < __cxx03/__memory/addressof.h>
1314#include < __cxx03/__memory/shared_ptr.h> // __libcpp_acquire_load
1415#include < __cxx03/__tuple/tuple_indices.h>
1516#include < __cxx03/__tuple/tuple_size.h>
@@ -82,15 +83,15 @@ template <class _Callable>
8283inline _LIBCPP_HIDE_FROM_ABI void call_once (once_flag& __flag, _Callable& __func) {
8384 if (__libcpp_acquire_load (&__flag.__state_ ) != once_flag::_Complete) {
8485 __call_once_param<_Callable> __p (__func);
85- std::__call_once (__flag.__state_ , & __p, & __call_once_proxy<_Callable>);
86+ std::__call_once (__flag.__state_ , std::addressof ( __p), std::addressof ( __call_once_proxy<_Callable>) );
8687 }
8788}
8889
8990template <class _Callable >
9091inline _LIBCPP_HIDE_FROM_ABI void call_once (once_flag& __flag, const _Callable& __func) {
9192 if (__libcpp_acquire_load (&__flag.__state_ ) != once_flag::_Complete) {
9293 __call_once_param<const _Callable> __p (__func);
93- std::__call_once (__flag.__state_ , & __p, & __call_once_proxy<const _Callable>);
94+ std::__call_once (__flag.__state_ , std::addressof ( __p), std::addressof ( __call_once_proxy<const _Callable>) );
9495 }
9596}
9697
Original file line number Diff line number Diff line change 88
99// UNSUPPORTED: no-threads
1010
11- // XFAIL: FROZEN-CXX03-HEADERS-FIXME
12-
1311// <mutex>
1412
1513// struct once_flag;
You can’t perform that action at this time.
0 commit comments