Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:29:24

0001 //
0002 // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // Official repository: https://github.com/boostorg/beast
0008 //
0009 
0010 #ifndef BOOST_BEAST_CORE_DETAIL_ASYNC_BASE_HPP
0011 #define BOOST_BEAST_CORE_DETAIL_ASYNC_BASE_HPP
0012 
0013 #include <boost/core/exchange.hpp>
0014 
0015 namespace boost {
0016 namespace beast {
0017 namespace detail {
0018 
0019 struct stable_base
0020 {
0021     static
0022     void
0023     destroy_list(stable_base*& list)
0024     {
0025         while(list)
0026         {
0027             auto next = list->next_;
0028             list->destroy();
0029             list = next;
0030         }
0031     }
0032 
0033     stable_base* next_ = nullptr;
0034 
0035 protected:
0036     stable_base() = default;
0037     virtual ~stable_base() = default;
0038 
0039     virtual void destroy() = 0;
0040 };
0041 
0042 } // detail
0043 } // beast
0044 } // boost
0045 
0046 #endif