[iter] Use default operators instead of redefining empty ones

This commit is contained in:
Behdad Esfahbod 2019-05-15 14:19:20 -07:00
parent 125c45ed36
commit f244224dbb
1 changed files with 15 additions and 11 deletions

View File

@ -119,9 +119,11 @@ struct hb_iter_t
iter_t operator << (const T v) && { **thiz() = v; ++*thiz(); return *thiz(); }
protected:
hb_iter_t () {}
hb_iter_t (const hb_iter_t &o HB_UNUSED) {}
void operator = (const hb_iter_t &o HB_UNUSED) {}
hb_iter_t () = default;
hb_iter_t (const hb_iter_t &o HB_UNUSED) = default;
hb_iter_t (hb_iter_t &&o HB_UNUSED) = default;
hb_iter_t& operator = (const hb_iter_t &o HB_UNUSED) = default;
hb_iter_t& operator = (hb_iter_t &&o HB_UNUSED) = default;
};
#define HB_ITER_USING(Name) \
@ -214,9 +216,11 @@ struct hb_iter_fallback_mixin_t
}
protected:
hb_iter_fallback_mixin_t () {}
hb_iter_fallback_mixin_t (const hb_iter_fallback_mixin_t &o HB_UNUSED) {}
void operator = (const hb_iter_fallback_mixin_t &o HB_UNUSED) {}
hb_iter_fallback_mixin_t () = default;
hb_iter_fallback_mixin_t (const hb_iter_fallback_mixin_t &o HB_UNUSED) = default;
hb_iter_fallback_mixin_t (hb_iter_fallback_mixin_t &&o HB_UNUSED) = default;
hb_iter_fallback_mixin_t& operator = (const hb_iter_fallback_mixin_t &o HB_UNUSED) = default;
hb_iter_fallback_mixin_t& operator = (hb_iter_fallback_mixin_t &&o HB_UNUSED) = default;
};
template <typename iter_t, typename item_t = typename iter_t::__item_t__>
@ -225,11 +229,11 @@ struct hb_iter_with_fallback_t :
hb_iter_fallback_mixin_t<iter_t, item_t>
{
protected:
hb_iter_with_fallback_t () {}
hb_iter_with_fallback_t (const hb_iter_with_fallback_t &o HB_UNUSED) :
hb_iter_t<iter_t, item_t> (o),
hb_iter_fallback_mixin_t<iter_t, item_t> (o) {}
void operator = (const hb_iter_with_fallback_t &o HB_UNUSED) {}
hb_iter_with_fallback_t () = default;
hb_iter_with_fallback_t (const hb_iter_with_fallback_t &o HB_UNUSED) = default;
hb_iter_with_fallback_t (hb_iter_with_fallback_t &&o HB_UNUSED) = default;
hb_iter_with_fallback_t& operator = (const hb_iter_with_fallback_t &o HB_UNUSED) = default;
hb_iter_with_fallback_t& operator = (hb_iter_with_fallback_t &&o HB_UNUSED) = default;
};
/*