| 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) |
nothing calls this directly
no test coverage detected