mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 23:14:13 +01:00
ircd::db::column: Indicate noexcept for various out-of-lines.
This commit is contained in:
parent
8df7fd1180
commit
df619e6010
2 changed files with 20 additions and 14 deletions
|
@ -192,10 +192,10 @@ struct ircd::db::column::delta
|
|||
|
||||
namespace ircd::db
|
||||
{
|
||||
bool operator==(const column::const_iterator_base &, const column::const_iterator_base &);
|
||||
bool operator!=(const column::const_iterator_base &, const column::const_iterator_base &);
|
||||
bool operator<(const column::const_iterator_base &, const column::const_iterator_base &);
|
||||
bool operator>(const column::const_iterator_base &, const column::const_iterator_base &);
|
||||
bool operator==(const column::const_iterator_base &, const column::const_iterator_base &) noexcept;
|
||||
bool operator!=(const column::const_iterator_base &, const column::const_iterator_base &) noexcept;
|
||||
bool operator<(const column::const_iterator_base &, const column::const_iterator_base &) noexcept;
|
||||
bool operator>(const column::const_iterator_base &, const column::const_iterator_base &) noexcept;
|
||||
}
|
||||
|
||||
/// Iteration over all keys down a column. Default construction is an invalid
|
||||
|
@ -219,7 +219,7 @@ struct ircd::db::column::const_iterator_base
|
|||
std::unique_ptr<rocksdb::Iterator> it;
|
||||
mutable value_type val;
|
||||
|
||||
const_iterator_base(database::column *const &, std::unique_ptr<rocksdb::Iterator> &&, db::gopts = {});
|
||||
const_iterator_base(database::column *const &, std::unique_ptr<rocksdb::Iterator> &&, db::gopts = {}) noexcept;
|
||||
|
||||
public:
|
||||
explicit operator const database::column &() const;
|
||||
|
@ -230,21 +230,21 @@ struct ircd::db::column::const_iterator_base
|
|||
explicit operator database::snapshot &();
|
||||
explicit operator gopts &();
|
||||
|
||||
operator bool() const;
|
||||
bool operator!() const;
|
||||
operator bool() const noexcept;
|
||||
bool operator!() const noexcept;
|
||||
|
||||
const value_type *operator->() const;
|
||||
const value_type &operator*() const;
|
||||
|
||||
const_iterator_base();
|
||||
const_iterator_base() noexcept;
|
||||
const_iterator_base(const_iterator_base &&) noexcept;
|
||||
const_iterator_base &operator=(const_iterator_base &&) noexcept;
|
||||
~const_iterator_base() noexcept;
|
||||
|
||||
friend bool operator==(const const_iterator_base &, const const_iterator_base &);
|
||||
friend bool operator!=(const const_iterator_base &, const const_iterator_base &);
|
||||
friend bool operator<(const const_iterator_base &, const const_iterator_base &);
|
||||
friend bool operator>(const const_iterator_base &, const const_iterator_base &);
|
||||
friend bool operator==(const const_iterator_base &, const const_iterator_base &) noexcept;
|
||||
friend bool operator!=(const const_iterator_base &, const const_iterator_base &) noexcept;
|
||||
friend bool operator<(const const_iterator_base &, const const_iterator_base &) noexcept;
|
||||
friend bool operator>(const const_iterator_base &, const const_iterator_base &) noexcept;
|
||||
|
||||
template<class pos> friend bool seek(column::const_iterator_base &, const pos &);
|
||||
};
|
||||
|
|
10
ircd/db.cc
10
ircd/db.cc
|
@ -7076,6 +7076,7 @@ noexcept
|
|||
|
||||
// linkage for incmplete rocksdb::Iterator
|
||||
ircd::db::column::const_iterator_base::const_iterator_base()
|
||||
noexcept
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -7088,6 +7089,7 @@ noexcept
|
|||
ircd::db::column::const_iterator_base::const_iterator_base(database::column *const &c,
|
||||
std::unique_ptr<rocksdb::Iterator> &&it,
|
||||
gopts opts)
|
||||
noexcept
|
||||
:c{c}
|
||||
,opts{std::move(opts)}
|
||||
,it{std::move(it)}
|
||||
|
@ -7113,13 +7115,13 @@ const
|
|||
|
||||
bool
|
||||
ircd::db::column::const_iterator_base::operator!()
|
||||
const
|
||||
const noexcept
|
||||
{
|
||||
return !static_cast<bool>(*this);
|
||||
}
|
||||
|
||||
ircd::db::column::const_iterator_base::operator bool()
|
||||
const
|
||||
const noexcept
|
||||
{
|
||||
if(!it)
|
||||
return false;
|
||||
|
@ -7132,12 +7134,14 @@ const
|
|||
|
||||
bool
|
||||
ircd::db::operator!=(const column::const_iterator_base &a, const column::const_iterator_base &b)
|
||||
noexcept
|
||||
{
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
bool
|
||||
ircd::db::operator==(const column::const_iterator_base &a, const column::const_iterator_base &b)
|
||||
noexcept
|
||||
{
|
||||
if(a && b)
|
||||
{
|
||||
|
@ -7154,6 +7158,7 @@ ircd::db::operator==(const column::const_iterator_base &a, const column::const_i
|
|||
|
||||
bool
|
||||
ircd::db::operator>(const column::const_iterator_base &a, const column::const_iterator_base &b)
|
||||
noexcept
|
||||
{
|
||||
if(a && b)
|
||||
{
|
||||
|
@ -7174,6 +7179,7 @@ ircd::db::operator>(const column::const_iterator_base &a, const column::const_it
|
|||
|
||||
bool
|
||||
ircd::db::operator<(const column::const_iterator_base &a, const column::const_iterator_base &b)
|
||||
noexcept
|
||||
{
|
||||
if(a && b)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue