summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-04 15:18:32 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-04 15:18:32 +0100
commita65aaeb43df61a9127aed0c4eb8dd4cb0b3b0bd6 (patch)
tree020f69f766545fa6fc960b3fdfcb4a7cda20313d /compat
parent7fa7b3bc844d61ecc986f77819a11d1e4a526c57 (diff)
b
Diffstat (limited to 'compat')
-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