[algs] Add hb_inc() and hb_dec())

This commit is contained in:
Behdad Esfahbod 2019-08-30 09:51:22 -05:00
parent 7eafe94705
commit 2d5643aed4

View File

@ -994,6 +994,18 @@ struct
operator () (const T &a) const HB_AUTO_RETURN (-a)
}
HB_FUNCOBJ (hb_neg);
struct
{
template <typename T> constexpr auto
operator () (const T &a) const HB_AUTO_RETURN (++a)
}
HB_FUNCOBJ (hb_inc);
struct
{
template <typename T> constexpr auto
operator () (const T &a) const HB_AUTO_RETURN (--a)
}
HB_FUNCOBJ (hb_dec);
/* Compiler-assisted vectorization. */