5 # ifndef VCCC_TYPE_SUPPORT_STD_VECTOR_HPP
6 # define VCCC_TYPE_SUPPORT_STD_VECTOR_HPP
26 template<
typename T,
typename Allocator = std::allocator<T>>
28 std::vector<T, Allocator> vec;
45 template<
typename T,
typename Allocator>
46 std::vector<T, Allocator>&
concat(std::vector<T, Allocator>&
to,
const std::vector<T, Allocator>& from) {
47 to.reserve(
to.size() + from.size());
48 for(
int i=0; i<from.size(); ++i)
49 to.emplace_back(from[i]);
60 template<
typename T,
typename Allocator>
61 std::vector<T, Allocator>&
concat(std::vector<T, Allocator>&
to, std::vector<T, Allocator>&& from) {
62 to.reserve(
to.size() + from.size());
63 for(
int i=0; i<from.size(); ++i)
64 to.emplace_back(std::move(from[i]));
constexpr std::enable_if_t<(detail::ranges_to_1_tag< C, R, Args... >::value > 0), C > to(R &&r, Args &&... args)
Constructs an object of type C from the elements of r
Definition: to.hpp:446
std::vector< T, Allocator > & concat(std::vector< T, Allocator > &to, const std::vector< T, Allocator > &from)
Definition: vector.hpp:46
std::vector< T, Allocator > reserved_vector(typename std::vector< T, Allocator >::size_type size)
returns reserved vector
Definition: vector.hpp:27
Definition: directory.h:12
constexpr auto size(const C &c) -> decltype(c.size())
Definition: size.hpp:16