aboutsummaryrefslogtreecommitdiff
path: root/include/openvic-dataloader/csv/LineObject.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/openvic-dataloader/csv/LineObject.hpp')
-rw-r--r--include/openvic-dataloader/csv/LineObject.hpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/include/openvic-dataloader/csv/LineObject.hpp b/include/openvic-dataloader/csv/LineObject.hpp
index 0494ffb..8a9c2ec 100644
--- a/include/openvic-dataloader/csv/LineObject.hpp
+++ b/include/openvic-dataloader/csv/LineObject.hpp
@@ -10,6 +10,8 @@
#include <tuple>
#include <vector>
+#include <openvic-dataloader/detail/VectorConstexpr.hpp>
+
namespace ovdl::csv {
/// LineObject should be able to recognize the differences between:
/// Input -> Indexes == ""
@@ -30,20 +32,20 @@ namespace ovdl::csv {
using inner_value_type = std::string;
using container_type = std::vector<std::tuple<position_type, inner_value_type>>;
- constexpr LineObject() = default;
- constexpr LineObject(LineObject&) = default;
- constexpr LineObject(LineObject&&) = default;
- constexpr LineObject(const LineObject&) = default;
+ OVDL_VECTOR_CONSTEXPR LineObject() = default;
+ OVDL_VECTOR_CONSTEXPR LineObject(LineObject&) = default;
+ OVDL_VECTOR_CONSTEXPR LineObject(LineObject&&) = default;
+ OVDL_VECTOR_CONSTEXPR LineObject(const LineObject&) = default;
- constexpr LineObject& operator=(const LineObject& other) = default;
- constexpr LineObject& operator=(LineObject&& other) = default;
+ OVDL_VECTOR_CONSTEXPR LineObject& operator=(const LineObject& other) = default;
+ OVDL_VECTOR_CONSTEXPR LineObject& operator=(LineObject&& other) = default;
- constexpr ~LineObject() = default;
+ OVDL_VECTOR_CONSTEXPR ~LineObject() = default;
- constexpr LineObject(std::initializer_list<value_type> pos_and_val) : container_type(pos_and_val) {
+ OVDL_VECTOR_CONSTEXPR LineObject(std::initializer_list<value_type> pos_and_val) : container_type(pos_and_val) {
}
- constexpr LineObject(position_type prefix_end, std::initializer_list<value_type> pos_and_val, position_type suffix_end = 0)
+ OVDL_VECTOR_CONSTEXPR LineObject(position_type prefix_end, std::initializer_list<value_type> pos_and_val, position_type suffix_end = 0)
: container_type(pos_and_val),
_prefix_end(prefix_end),
_suffix_end(suffix_end) {
@@ -77,8 +79,8 @@ namespace ovdl::csv {
private:
// Should be position of first valid value on line
- position_type _prefix_end;
+ position_type _prefix_end = 0;
// Should be position after last value or position after last seperator
- position_type _suffix_end;
+ position_type _suffix_end = 0;
};
} \ No newline at end of file