summaryrefslogtreecommitdiffhomepage
path: root/compat/vector-wrapper.hpp
blob: 1b6f06177c25ce15f6a8dc3021c64c18ff20e1e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#pragma once
#include <vector>

namespace floormat {

template<typename T>
struct vector_wrapper final
{
    using vector_type = std::conditional_t<std::is_const_v<T>,
                                           const std::vector<std::remove_const_t<T>>,
                                           std::vector<T>>;
    vector_type& vec;
};

} // namespace floormat