| 252 | |
| 253 | template <class E> |
| 254 | class capturing_slot_node final: |
| 255 | public slot<E>, |
| 256 | public capturing_node |
| 257 | { |
| 258 | using impl = slot<E>; |
| 259 | capturing_slot_node( capturing_slot_node const & ) = delete; |
| 260 | capturing_slot_node & operator=( capturing_slot_node const & ) = delete; |
| 261 | void deactivate() const noexcept override |
| 262 | { |
| 263 | impl::deactivate(); |
| 264 | } |
| 265 | void unload( int err_id ) override |
| 266 | { |
| 267 | impl::unload(err_id); |
| 268 | } |
| 269 | void serialize_to_(encoder & e, error_id const & id) const override |
| 270 | { |
| 271 | impl::serialize_to(e, id); |
| 272 | } |
| 273 | public: |
| 274 | BOOST_LEAF_CONSTEXPR explicit capturing_slot_node( capture_list::node * * & last ): |
| 275 | capturing_node(last) |
| 276 | { |
| 277 | BOOST_LEAF_ASSERT(last == &next_); |
| 278 | BOOST_LEAF_ASSERT(next_ == nullptr); |
| 279 | } |
| 280 | template <class T> |
| 281 | BOOST_LEAF_CONSTEXPR capturing_slot_node( capture_list::node * * & last, int err_id, T && e ): |
| 282 | slot<E>(err_id, std::forward<T>(e)), |
| 283 | capturing_node(last) |
| 284 | { |
| 285 | BOOST_LEAF_ASSERT(last == &next_); |
| 286 | BOOST_LEAF_ASSERT(next_ == nullptr); |
| 287 | } |
| 288 | }; |
| 289 | |
| 290 | #ifndef BOOST_LEAF_NO_EXCEPTIONS |
| 291 | class capturing_exception_node final: |
| 292 | public capturing_node |
| 293 | { |
| 294 | capturing_exception_node( capturing_exception_node const & ) = delete; |
| 295 | capturing_exception_node & operator=( capturing_exception_node const & ) = delete; |
| 296 | void deactivate() const noexcept override |
| 297 | { |
| 298 | BOOST_LEAF_ASSERT(0); |
| 299 | } |
| 300 | void unload( int ) override |
| 301 | { |
| 302 | std::rethrow_exception(ex_); |
| 303 | } |
| 304 | void serialize_to_(encoder &, error_id const &) const override |
| 305 | { |
| 306 | } |
| 307 | std::exception_ptr const ex_; |
| 308 | public: |
| 309 | capturing_exception_node( capture_list::node * * & last, std::exception_ptr && ex ) noexcept: |
| 310 | capturing_node(last), |
| 311 | ex_(std::move(ex)) |
nothing calls this directly
no outgoing calls
no test coverage detected