| 334 | |
| 335 | template <class _Env> |
| 336 | [[nodiscard]] |
| 337 | static auto __mk_alloc(_Env const & __env) noexcept -> allocator_type |
| 338 | { |
| 339 | if constexpr (__task::__has_allocator_compatible_with<_Env, allocator_type>) |
| 340 | { |
| 341 | return allocator_type(get_allocator(__env)); |
| 342 | } |
| 343 | else if constexpr (std::default_initializable<allocator_type>) |
| 344 | { |
| 345 | return allocator_type{}; |
| 346 | } |
| 347 | else |
| 348 | { |
| 349 | static_assert(__task::__has_compatible_allocator<_Env, allocator_type>, |
| 350 | "Unable to construct the task's allocator. No suitable constructor found."); |
| 351 | __std::unreachable(); |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | template <class _Env> |
| 356 | [[nodiscard]] |
nothing calls this directly
no test coverage detected