0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

ircd::util: Fix instance_list noexcept specification for move semantics.

This commit is contained in:
Jason Volk 2018-09-01 20:45:04 -07:00
parent b63c103bb7
commit 349edc2c97

View file

@ -39,31 +39,42 @@ struct ircd::util::instance_list
typename decltype(list)::iterator it;
instance_list();
instance_list(instance_list &&);
instance_list(instance_list &&) noexcept;
instance_list(const instance_list &);
instance_list &operator=(instance_list &&);
instance_list &operator=(instance_list &&) noexcept;
instance_list &operator=(const instance_list &);
~instance_list() noexcept;
};
template<class T>
ircd::util::instance_list<T>::instance_list()
:it{list.emplace(end(list), static_cast<T *>(this))}
:it
{
list.emplace(end(list), static_cast<T *>(this))
}
{}
template<class T>
ircd::util::instance_list<T>::instance_list(instance_list &&other)
:it{list.emplace(end(list), static_cast<T *>(this))}
noexcept
:it
{
list.emplace(end(list), static_cast<T *>(this))
}
{}
template<class T>
ircd::util::instance_list<T>::instance_list(const instance_list &other)
:it{list.emplace(end(list), static_cast<T *>(this))}
:it
{
list.emplace(end(list), static_cast<T *>(this))
}
{}
template<class T>
ircd::util::instance_list<T> &
ircd::util::instance_list<T>::operator=(instance_list &&other)
noexcept
{
assert(it != end(list));
return *this;