summaryrefslogtreecommitdiffhomepage
path: root/compat/vector-wrapper.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'compat/vector-wrapper.hpp')
-rw-r--r--compat/vector-wrapper.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/compat/vector-wrapper.hpp b/compat/vector-wrapper.hpp
new file mode 100644
index 00000000..1b6f0617
--- /dev/null
+++ b/compat/vector-wrapper.hpp
@@ -0,0 +1,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