diff --git a/deps/ox/src/ox/std/vector.hpp b/deps/ox/src/ox/std/vector.hpp index 60f475c8..31415acd 100644 --- a/deps/ox/src/ox/std/vector.hpp +++ b/deps/ox/src/ox/std/vector.hpp @@ -8,6 +8,10 @@ #pragma once +#if __has_include() +#include +#endif + #include "bit.hpp" #include "iterator.hpp" #include "math.hpp" @@ -186,6 +190,10 @@ class Vector: detail::SmallVector { explicit Vector(std::size_t size) noexcept; + #if __has_include() + Vector(std::initializer_list list) noexcept; + #endif + Vector(const Vector &other); Vector(Vector &&other) noexcept; @@ -304,6 +312,15 @@ Vector::Vector(std::size_t size) noexcept { } } +#if __has_include() +template +Vector::Vector(std::initializer_list list) noexcept { + for (auto &item : list) { + emplace_back(item); + } +} +#endif + template Vector::Vector(const Vector &other) { m_size = other.m_size;