lib/nfs/Cancellable: use IntrusiveList instead of boost::intrusive::list

This commit is contained in:
Max Kellermann 2022-11-10 11:59:59 +01:00
parent b3c5e6a3cc
commit 4041d87c34

View File

@ -20,14 +20,15 @@
#ifndef MPD_NFS_CANCELLABLE_HXX #ifndef MPD_NFS_CANCELLABLE_HXX
#define MPD_NFS_CANCELLABLE_HXX #define MPD_NFS_CANCELLABLE_HXX
#include <boost/intrusive/list.hpp> #include "util/IntrusiveList.hxx"
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>
template<typename T> template<typename T>
class CancellablePointer class CancellablePointer
: public boost::intrusive::list_base_hook<boost::intrusive::link_mode<boost::intrusive::normal_link>> { : public IntrusiveListHook
{
public: public:
typedef T *pointer; typedef T *pointer;
typedef T &reference; typedef T &reference;
@ -69,8 +70,7 @@ public:
typedef typename CT::const_reference const_reference; typedef typename CT::const_reference const_reference;
private: private:
typedef boost::intrusive::list<CT, using List = IntrusiveList<CT>;
boost::intrusive::constant_time_size<false>> List;
typedef typename List::iterator iterator; typedef typename List::iterator iterator;
typedef typename List::const_iterator const_iterator; typedef typename List::const_iterator const_iterator;
List list; List list;