diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-08 22:48:19 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-08 22:48:19 +0100 |
commit | aceb0a84b4abaa4e631d317c6cd0d02b0aa0bdbd (patch) | |
tree | 79d4335c1be282ad6a76bd7834d585ce4418989a /compat/vector-wrapper.hpp | |
parent | 24209b545e061caf601fbdd473936ccba2d95ceb (diff) |
style issues
Diffstat (limited to 'compat/vector-wrapper.hpp')
-rw-r--r-- | compat/vector-wrapper.hpp | 9 |
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 |