diff --git a/include/lol/private/base/containers.h b/include/lol/private/base/containers.h index adf6bfa7..04390d29 100644 --- a/include/lol/private/base/containers.h +++ b/include/lol/private/base/containers.h @@ -51,6 +51,12 @@ static inline std::vector keys(T const &m) return ret; } +template +static inline auto insert_at(std::vector &v, size_t i, T const &x) +{ + return v.insert(v.begin() + i, x); +} + template static inline auto remove_at(std::vector &v, size_t i) {