12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #ifndef BOOST_BEAST_CORE_DETAIL_ASYNC_BASE_HPP
- #define BOOST_BEAST_CORE_DETAIL_ASYNC_BASE_HPP
- #include <boost/core/exchange.hpp>
- namespace boost {
- namespace beast {
- namespace detail {
- struct stable_base
- {
- static
- void
- destroy_list(stable_base*& list)
- {
- while(list)
- {
- auto next = list->next_;
- list->destroy();
- list = next;
- }
- }
- stable_base* next_ = nullptr;
- protected:
- stable_base() = default;
- virtual ~stable_base() = default;
- virtual void destroy() = 0;
- };
- }
- }
- }
- #endif
|