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.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/compat/vector-wrapper.hpp b/compat/vector-wrapper.hpp
index 1b6f0617..cb6e7549 100644
--- a/compat/vector-wrapper.hpp
+++ b/compat/vector-wrapper.hpp
@@ -1,4 +1,5 @@
#pragma once
+#include "vector-wrapper-fwd.hpp" // todo!
#include <vector>
namespace floormat {
@@ -6,10 +7,10 @@ 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;
+ using vector_type = std::conditional_t<std::is_const_v<T>, const std::vector<std::remove_const_t<T>>, std::vector<T>>;
+ using qualified_type = std::conditional_t<std::is_const_v<T>, vector_type, vector_type&>;
+
+ qualified_type vec;
};
} // namespace floormat