From 38c4805cd3cb04a07b2f8275064396ace6ddf596 Mon Sep 17 00:00:00 2001 From: Svenja Mehringer Date: Wed, 12 Jan 2022 12:21:06 +0100 Subject: [PATCH 1/3] [MISC] Remove dependency on ranges::move and cpp20::back_inserter. --- include/sharg/validators.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/sharg/validators.hpp b/include/sharg/validators.hpp index 1809252a..6d8cbecc 100644 --- a/include/sharg/validators.hpp +++ b/include/sharg/validators.hpp @@ -174,7 +174,8 @@ class value_list_validator value_list_validator(range_type rng) { values.clear(); - std::ranges::move(std::move(rng), std::cpp20::back_inserter(values)); + for (auto & val : rng) + values.push_back(std::move(val)); } /*!\brief Constructing from a parameter pack. From f2b3c7228c020c0016a912511aa2fb432c850aa8 Mon Sep 17 00:00:00 2001 From: Svenja Mehringer Date: Fri, 14 Jan 2022 08:05:56 +0100 Subject: [PATCH 2/3] Update include/sharg/validators.hpp Co-authored-by: Enrico Seiler --- include/sharg/validators.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/sharg/validators.hpp b/include/sharg/validators.hpp index 6d8cbecc..8328bee3 100644 --- a/include/sharg/validators.hpp +++ b/include/sharg/validators.hpp @@ -174,8 +174,7 @@ class value_list_validator value_list_validator(range_type rng) { values.clear(); - for (auto & val : rng) - values.push_back(std::move(val)); + std::move(rng.begin(), rng.end(), std::back_inserter(values)); } /*!\brief Constructing from a parameter pack. From b1b37869e3f5e55247e5bff15b148097096f2353 Mon Sep 17 00:00:00 2001 From: Svenja Mehringer Date: Mon, 17 Jan 2022 14:19:20 +0100 Subject: [PATCH 3/3] Update include/sharg/validators.hpp --- include/sharg/validators.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sharg/validators.hpp b/include/sharg/validators.hpp index 8328bee3..4c0e4464 100644 --- a/include/sharg/validators.hpp +++ b/include/sharg/validators.hpp @@ -174,7 +174,7 @@ class value_list_validator value_list_validator(range_type rng) { values.clear(); - std::move(rng.begin(), rng.end(), std::back_inserter(values)); + std::move(rng.begin(), rng.end(), std::back_inserter(values)); } /*!\brief Constructing from a parameter pack.