MCPcopy Create free account
hub / github.com/NVIDIA/stdexec / __mk_alloc

Method __mk_alloc

include/stdexec/__detail/__task.hpp:336–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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]]

Callers

nothing calls this directly

Calls 2

get_allocatorFunction · 0.85
unreachableFunction · 0.85

Tested by

no test coverage detected