| 1 |
template<typename _Tp, _Tp __v> |
| 2 |
struct integral_constant |
| 3 |
{ |
| 4 |
static constexpr _Tp value = __v; |
| 5 |
typedef _Tp value_type; |
| 6 |
typedef integral_constant<_Tp, __v> type; |
| 7 |
}; |
| 8 |
|
| 9 |
template<typename _Tp, _Tp __v> |
| 10 |
constexpr _Tp integral_constant<_Tp, __v>::value; |
| 11 |
|
| 12 |
typedef integral_constant<bool, false> false_type; |
| 13 |
|
| 14 |
|
| 15 |
template<typename _T1> |
| 16 |
struct Alien |
| 17 |
{ |
| 18 |
}; |
| 19 |
|
| 20 |
template<typename _T1> |
| 21 |
bool operator==(const Alien<_T1>& __x, const Alien<_T1>& __y); |
| 22 |
|
| 23 |
template<typename _Rep> |
| 24 |
struct duration; |
| 25 |
|
| 26 |
template<bool _DenIsOne> |
| 27 |
struct __duration_cast_impl |
| 28 |
{ |
| 29 |
}; |
| 30 |
|
| 31 |
template<typename _ToDur, typename _Rep> |
| 32 |
long Frob (const duration<_Rep>& __d) |
| 33 |
{ |
| 34 |
typedef __duration_cast_impl<// finds ::operator== |
| 35 |
_ToDur::num == 1> __dc; |
| 36 |
|
| 37 |
return 0; |
| 38 |
} |
| 39 |
|
| 40 |
template<typename _Rep> |
| 41 |
struct duration |
| 42 |
{ |
| 43 |
public: |
| 44 |
constexpr duration() = default; |
| 45 |
|
| 46 |
duration (const duration& __d) |
| 47 |
{ |
| 48 |
Frob <duration> (__d); |
| 49 |
} |
| 50 |
}; |
| 51 |
|
| 52 |
template<typename _Tp> |
| 53 |
struct __atomic_semaphore |
| 54 |
{ |
| 55 |
template<typename _Rep> |
| 56 |
bool _M_try_acquire_for (const duration<_Rep>& __rtime) noexcept; |
| 57 |
|
| 58 |
void _M_release() noexcept; |
| 59 |
}; |
| 60 |
|
| 61 |
template<long __least_max_value> |
| 62 |
class counting_semaphore |
| 63 |
{ |
| 64 |
__atomic_semaphore<unsigned> _M_sem; |
| 65 |
|
| 66 |
public: |
| 67 |
explicit counting_semaphore() noexcept; |
| 68 |
|
| 69 |
void release() noexcept (noexcept (_M_sem._M_release ())); |
| 70 |
}; |
| 71 |
|
| 72 |
class stop_token |
| 73 |
{ |
| 74 |
public: |
| 75 |
counting_semaphore<1> _M_done; |
| 76 |
}; |
| 77 |
|
| 78 |
bool operator==(const stop_token& __a, const stop_token& __b); |