diff --git a/libcxx/include/__stop_token/stop_callback.h b/libcxx/include/__stop_token/stop_callback.h --- a/libcxx/include/__stop_token/stop_callback.h +++ b/libcxx/include/__stop_token/stop_callback.h @@ -28,7 +28,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if _LIBCPP_STD_VER >= 20 +#if _LIBCPP_STD_VER >= 20 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) template class _LIBCPP_AVAILABILITY_SYNC stop_callback : private __stop_callback_base { @@ -96,4 +96,4 @@ _LIBCPP_END_NAMESPACE_STD -#endif // _LIBCPP___STOP_TOKEN_STOP_TOKEN_H +#endif // _LIBCPP_STD_VER >= 20 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) diff --git a/libcxx/include/__stop_token/stop_source.h b/libcxx/include/__stop_token/stop_source.h --- a/libcxx/include/__stop_token/stop_source.h +++ b/libcxx/include/__stop_token/stop_source.h @@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if _LIBCPP_STD_VER >= 20 +#if _LIBCPP_STD_VER >= 20 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) struct nostopstate_t { explicit nostopstate_t() = default; @@ -89,4 +89,4 @@ _LIBCPP_END_NAMESPACE_STD -#endif // _LIBCPP___STOP_TOKEN_STOP_SOURCE_H +#endif // _LIBCPP_STD_VER >= 20 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) diff --git a/libcxx/include/__stop_token/stop_token.h b/libcxx/include/__stop_token/stop_token.h --- a/libcxx/include/__stop_token/stop_token.h +++ b/libcxx/include/__stop_token/stop_token.h @@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if _LIBCPP_STD_VER >= 20 +#if _LIBCPP_STD_VER >= 20 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) class _LIBCPP_AVAILABILITY_SYNC stop_token { public: @@ -57,7 +57,7 @@ _LIBCPP_HIDE_FROM_ABI explicit stop_token(const __intrusive_shared_ptr<__stop_state>& __state) : __state_(__state) {} }; -#endif // _LIBCPP_STD_VER >= 20 +#endif // _LIBCPP_STD_VER >= 20 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/test/std/thread/thread.stoptoken/nostopstate/cons.default.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/nostopstate/cons.default.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/nostopstate/cons.default.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/nostopstate/cons.default.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // struct nostopstate_t { diff --git a/libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.const.token.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.const.token.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.const.token.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.const.token.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.rvalue.token.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.rvalue.token.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.rvalue.token.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.rvalue.token.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopcallback/copy.move.compile.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopcallback/copy.move.compile.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopcallback/copy.move.compile.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopcallback/copy.move.compile.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopcallback/ctad.compile.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopcallback/ctad.compile.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopcallback/ctad.compile.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopcallback/ctad.compile.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopcallback/typedef.compile.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopcallback/typedef.compile.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopcallback/typedef.compile.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopcallback/typedef.compile.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // using callback_type = _Callback; diff --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/assign.copy.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/assign.copy.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopsource/assign.copy.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/assign.copy.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.copy.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.copy.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.copy.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.copy.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.default.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.default.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.default.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.default.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.move.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.move.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.move.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.move.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.nostopstate.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.nostopstate.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.nostopstate.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.nostopstate.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/equals.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/equals.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopsource/equals.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/equals.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/get_token.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/get_token.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopsource/get_token.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/get_token.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/move.copy.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/move.copy.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopsource/move.copy.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/move.copy.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/nodiscard.verify.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/nodiscard.verify.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopsource/nodiscard.verify.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/nodiscard.verify.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/request_stop.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/request_stop.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopsource/request_stop.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/request_stop.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/stop_possible.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/stop_possible.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopsource/stop_possible.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/stop_possible.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/stop_requested.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/stop_requested.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopsource/stop_requested.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/stop_requested.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/swap.free.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/swap.free.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopsource/swap.free.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/swap.free.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/swap.member.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/swap.member.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stopsource/swap.member.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/swap.member.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.copy.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.copy.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.copy.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.copy.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.move.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.move.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.move.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.move.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.copy.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.copy.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.copy.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.copy.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.default.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.default.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.default.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.default.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.move.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.move.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.move.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.move.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/equals.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/equals.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/equals.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/equals.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/nodiscard.verify.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/nodiscard.verify.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/nodiscard.verify.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/nodiscard.verify.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_possible.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_possible.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_possible.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_possible.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_requested.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_requested.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_requested.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_requested.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.free.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.free.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.free.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.free.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing diff --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.member.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.member.pass.cpp --- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.member.pass.cpp +++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.member.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // // UNSUPPORTED: no-threads +// UNSUPPORTED: !c++experimental // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: availability-synchronization_library-missing