gcc-9 doesn't seem to consider interator nothrow move constructible with
the default move constructor implementation yielding the following build
failure:
m/el8/BUILD/
ceph-17.0.0-7373-gfc349212/src/seastar/include/seastar/core/future.hh:584:58: error: static assertion failed: Types must be no-throw move constructible
584 | static_assert(std::is_nothrow_move_constructible<T>::value,
Signed-off-by: Samuel Just <sjust@redhat.com>
class iterator {
public:
- iterator(const iterator &) noexcept = default;
- iterator(iterator &&) noexcept = default;
+ iterator(const iterator &rhs) noexcept :
+ internal(rhs.internal), leaf(rhs.leaf) {}
+ iterator(iterator &&rhs) noexcept :
+ internal(std::move(rhs.internal)), leaf(std::move(rhs.leaf)) {}
+
iterator &operator=(const iterator &) = default;
iterator &operator=(iterator &&) = default;
}
private:
- iterator() = default;
- iterator(depth_t depth) : internal(depth - 1) {}
+ iterator() noexcept {}
+ iterator(depth_t depth) noexcept : internal(depth - 1) {}
friend class LBABtree;
static constexpr uint16_t INVALID = std::numeric_limits<uint16_t>::max();