summaryrefslogtreecommitdiff
path: root/lib/collections.hpp
blob: ad4d947b0f8cd5749272378dc1d948a1eb37fbc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#pragma once

#include <array>

template<typename T, std::size_t first, std::size_t second>
std::array<T, first + second>
operator+(const std::array<T, first> & a, const std::array<T, second> & b)
{
	std::array<T, first + second> r;
	auto out = r.begin();
	out = std::copy(a.begin(), a.end(), out);
	std::copy(b.begin(), b.end(), out);
	return r;
}