mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 02:02:38 +01:00
ircd::iov: Support default construction and nullification.
This commit is contained in:
parent
ed9a8691c4
commit
6fb3b44c05
1 changed files with 4 additions and 3 deletions
|
@ -57,11 +57,12 @@ template<class T>
|
|||
struct ircd::iov<T>::node
|
||||
:iov::list_node
|
||||
{
|
||||
iov &i;
|
||||
iov *const i {nullptr};
|
||||
|
||||
operator const T &() const;
|
||||
operator T &();
|
||||
|
||||
node() = default;
|
||||
template<class... args> node(iov &, args&&...);
|
||||
node(node &&) = delete;
|
||||
node(const node &) = delete;
|
||||
|
@ -74,7 +75,7 @@ template<class T>
|
|||
template<class... args>
|
||||
ircd::iov<T>::node::node(iov &iov,
|
||||
args&&... a)
|
||||
:i{iov}
|
||||
:i{&iov}
|
||||
{
|
||||
auto &list
|
||||
{
|
||||
|
@ -99,7 +100,7 @@ template<class T>
|
|||
ircd::iov<T>::node::~node()
|
||||
noexcept
|
||||
{
|
||||
i.remove_if([this](const T &x)
|
||||
i->remove_if([this](const T &x)
|
||||
{
|
||||
return &x == &static_cast<const T &>(*this);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue