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:
parent
b63c103bb7
commit
349edc2c97
1 changed files with 16 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue