MCPcopy Create free account
hub / github.com/boostorg/leaf / get_slot

Function get_slot

include/boost/leaf/error.hpp:481–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479
480 template <class E>
481 inline slot<E> * get_slot() noexcept(!BOOST_LEAF_CFG_CAPTURE)
482 {
483 static_assert(!std::is_pointer<E>::value, "Error objects of pointer types are not allowed");
484 static_assert(!std::is_same<E, error_id>::value, "Error objects of type error_id are not allowed");
485 if( slot<E> * p = tls::read_ptr<slot<E>>() )
486 return p;
487#if BOOST_LEAF_CFG_CAPTURE
488 if( dynamic_allocator * da = get_dynamic_allocator() )
489 return da->alloc<E>();
490#endif
491 return nullptr;
492 }
493
494 template <class E>
495 inline void slot<E>::unload( int err_id ) noexcept(!BOOST_LEAF_CFG_CAPTURE)

Callers

nothing calls this directly

Calls 1

get_dynamic_allocatorFunction · 0.85

Tested by

no test coverage detected