#pragma once namespace nall { template vector::vector(const initializer_list& values) { reserveRight(values.size()); for(auto& value : values) append(value); } template vector::vector(const vector& source) { operator=(source); } template vector::vector(vector&& source) { operator=(move(source)); } template vector::~vector() { reset(); } template vector::operator bool() const { return _size; } template vector::operator array_span() { return {data(), size()}; } template vector::operator array_view() const { return {data(), size()}; } template template auto vector::capacity() const -> uint64_t { return (_left + _size + _right) * sizeof(T) / sizeof(Cast); } template template auto vector::size() const -> uint64_t { return _size * sizeof(T) / sizeof(Cast); } template template auto vector::data() -> Cast* { return (Cast*)_pool; } template template auto vector::data() const -> const Cast* { return (const Cast*)_pool; } }