diff options
Diffstat (limited to 'include/openvic-dataloader/csv')
-rw-r--r-- | include/openvic-dataloader/csv/LineObject.hpp | 8 | ||||
-rw-r--r-- | include/openvic-dataloader/csv/ValueNode.hpp | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/include/openvic-dataloader/csv/LineObject.hpp b/include/openvic-dataloader/csv/LineObject.hpp index b9ee9a5..99c79c6 100644 --- a/include/openvic-dataloader/csv/LineObject.hpp +++ b/include/openvic-dataloader/csv/LineObject.hpp @@ -14,7 +14,7 @@ #include <vector> #include <openvic-dataloader/csv/ValueNode.hpp> -#include <openvic-dataloader/detail/VectorConstexpr.hpp> +#include <openvic-dataloader/detail/Constexprs.hpp> namespace ovdl::csv { /// LineObject should be able to recognize the differences between: @@ -57,7 +57,7 @@ namespace ovdl::csv { /// Special Functionality /// Retrieves value, produces "" for empty values - constexpr std::string get_value_for(std::size_t position) const { + OVDL_STRING_CONSTEXPR std::string get_value_for(std::size_t position) const { if (position < _prefix_end || position >= _suffix_end) return ""; for (const auto& object : *this) { if (object.get_position() == position) return object.make(); @@ -65,7 +65,7 @@ namespace ovdl::csv { return ""; } /// Tries to retrieve string, produces nullopt for empty values - constexpr std::optional<const std::string> try_get_string_at(std::size_t position) const { + OVDL_STR_OPT_CONSTEXPR std::optional<const std::string> try_get_string_at(std::size_t position) const { if (position < _prefix_end || position >= _suffix_end) return std::nullopt; for (const auto& object : *this) { if (object.get_position() == position) return object.make(); @@ -89,7 +89,7 @@ namespace ovdl::csv { return ""; } /// Tries to retrieve string, produces nullopt for empty values - constexpr std::optional<const std::string> try_get_string_at(std::size_t position, const IsMap<std::string> auto& map) const { + OVDL_STR_OPT_CONSTEXPR std::optional<const std::string> try_get_string_at(std::size_t position, const IsMap<std::string> auto& map) const { if (position < _prefix_end || position >= _suffix_end) return std::nullopt; for (const auto& object : *this) { if (object.get_position() == position) return object.make_from_map(map); diff --git a/include/openvic-dataloader/csv/ValueNode.hpp b/include/openvic-dataloader/csv/ValueNode.hpp index e66dac0..786f218 100644 --- a/include/openvic-dataloader/csv/ValueNode.hpp +++ b/include/openvic-dataloader/csv/ValueNode.hpp @@ -10,6 +10,8 @@ #include <variant> #include <vector> +#include <openvic-dataloader/detail/Constexprs.hpp> + #include <fmt/compile.h> #include <fmt/core.h> #include <fmt/format.h> @@ -54,7 +56,7 @@ namespace ovdl::csv { void add_to_list(internal_value_type value); bool list_is_empty() const; - inline std::string make_from_map(const IsMap<std::string> auto& map) const { + OVDL_STRING_CONSTEXPR std::string make_from_map(const IsMap<std::string> auto& map) const { std::vector<std::string_view> pre_joined(_value_list.size()); for (auto&& value : _value_list) { |