62 lines · plain
1// -*- C++ -*-2//===----------------------------------------------------------------------===//3//4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.5// See https://llvm.org/LICENSE.txt for license information.6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception7//8//===----------------------------------------------------------------------===//9 10#ifndef _LIBCPP_STOP_TOKEN11#define _LIBCPP_STOP_TOKEN12 13/*14 15namespace std {16 // [stoptoken], class stop_token17 class stop_token;18 19 // [stopsource], class stop_source20 class stop_source;21 22 // no-shared-stop-state indicator23 struct nostopstate_t {24 explicit nostopstate_t() = default;25 };26 inline constexpr nostopstate_t nostopstate{};27 28 // [stopcallback], class template stop_callback29 template<class Callback>30 class stop_callback;31 32*/33 34#if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)35# include <__cxx03/__config>36#else37# include <__config>38 39# if _LIBCPP_HAS_THREADS40 41# if _LIBCPP_STD_VER >= 2042# include <__stop_token/stop_callback.h>43# include <__stop_token/stop_source.h>44# include <__stop_token/stop_token.h>45# endif46 47# include <version>48 49# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)50# pragma GCC system_header51# endif52 53# endif // _LIBCPP_HAS_THREADS54 55# if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 2056# include <cstddef>57# include <iosfwd>58# endif59#endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)60 61#endif // _LIBCPP_STOP_TOKEN62