From 72d78c7611dd1deaf563126c7663ccb16d931e57 Mon Sep 17 00:00:00 2001 From: Rob McDonald Date: Thu, 2 Apr 2026 16:55:40 -0700 Subject: [PATCH 1/2] Change auto* to auto in trim_left/right MSVC could not sort out the type to use here. --- include/OpenABF/MeshIOUtils.hpp | 4 ++-- single_include/OpenABF/OpenABF.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/OpenABF/MeshIOUtils.hpp b/include/OpenABF/MeshIOUtils.hpp index b29d229..d4c2f1e 100644 --- a/include/OpenABF/MeshIOUtils.hpp +++ b/include/OpenABF/MeshIOUtils.hpp @@ -34,7 +34,7 @@ static auto icase_compare(const std::string_view a, const std::string_view b) static auto trim_left(std::string_view s) -> std::string_view { const auto& loc = std::locale(); - const auto* start = std::find_if_not( + const auto start = std::find_if_not( std::begin(s), std::end(s), [&loc](auto ch) -> bool { return std::isspace(ch, loc); }); s.remove_prefix(std::distance(std::begin(s), start)); @@ -45,7 +45,7 @@ static auto trim_left(std::string_view s) -> std::string_view static auto trim_right(std::string_view s) -> std::string_view { const auto& loc = std::locale(); - const auto* start = + const auto start = std::find_if_not(s.rbegin(), s.rend(), [&loc](auto ch) -> bool { return std::isspace(ch, loc); }).base(); diff --git a/single_include/OpenABF/OpenABF.hpp b/single_include/OpenABF/OpenABF.hpp index eb3d9a9..753621e 100644 --- a/single_include/OpenABF/OpenABF.hpp +++ b/single_include/OpenABF/OpenABF.hpp @@ -3078,7 +3078,7 @@ static auto icase_compare(const std::string_view a, const std::string_view b) static auto trim_left(std::string_view s) -> std::string_view { const auto& loc = std::locale(); - const auto* start = std::find_if_not( + const auto start = std::find_if_not( std::begin(s), std::end(s), [&loc](auto ch) -> bool { return std::isspace(ch, loc); }); s.remove_prefix(std::distance(std::begin(s), start)); @@ -3089,7 +3089,7 @@ static auto trim_left(std::string_view s) -> std::string_view static auto trim_right(std::string_view s) -> std::string_view { const auto& loc = std::locale(); - const auto* start = + const auto start = std::find_if_not(s.rbegin(), s.rend(), [&loc](auto ch) -> bool { return std::isspace(ch, loc); }).base(); From 8b16e67c08e826627d2712fcb4f0ec76a13a2bd1 Mon Sep 17 00:00:00 2001 From: Seth Parker Date: Fri, 3 Apr 2026 05:01:54 -0400 Subject: [PATCH 2/2] cf --- include/OpenABF/MeshIOUtils.hpp | 12 +++++------- single_include/OpenABF/OpenABF.hpp | 12 +++++------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/include/OpenABF/MeshIOUtils.hpp b/include/OpenABF/MeshIOUtils.hpp index ba7362a..64e71ec 100644 --- a/include/OpenABF/MeshIOUtils.hpp +++ b/include/OpenABF/MeshIOUtils.hpp @@ -33,9 +33,8 @@ static auto icase_compare(const std::string_view a, const std::string_view b) -> static auto trim_left(std::string_view s) -> std::string_view { const auto& loc = std::locale(); - const auto start = std::find_if_not( - std::begin(s), std::end(s), - [&loc](auto ch) -> bool { return std::isspace(ch, loc); }); + const auto start = std::find_if_not(std::begin(s), std::end(s), + [&loc](auto ch) -> bool { return std::isspace(ch, loc); }); s.remove_prefix(std::distance(std::begin(s), start)); return s; } @@ -44,10 +43,9 @@ static auto trim_left(std::string_view s) -> std::string_view static auto trim_right(std::string_view s) -> std::string_view { const auto& loc = std::locale(); - const auto start = - std::find_if_not(s.rbegin(), s.rend(), [&loc](auto ch) -> bool { - return std::isspace(ch, loc); - }).base(); + const auto start = std::find_if_not(s.rbegin(), s.rend(), [&loc](auto ch) -> bool { + return std::isspace(ch, loc); + }).base(); s.remove_suffix(std::distance(start, std::end(s))); return s; } diff --git a/single_include/OpenABF/OpenABF.hpp b/single_include/OpenABF/OpenABF.hpp index 9e2428a..d2d48c5 100644 --- a/single_include/OpenABF/OpenABF.hpp +++ b/single_include/OpenABF/OpenABF.hpp @@ -4435,9 +4435,8 @@ static auto icase_compare(const std::string_view a, const std::string_view b) -> static auto trim_left(std::string_view s) -> std::string_view { const auto& loc = std::locale(); - const auto start = std::find_if_not( - std::begin(s), std::end(s), - [&loc](auto ch) -> bool { return std::isspace(ch, loc); }); + const auto start = std::find_if_not(std::begin(s), std::end(s), + [&loc](auto ch) -> bool { return std::isspace(ch, loc); }); s.remove_prefix(std::distance(std::begin(s), start)); return s; } @@ -4446,10 +4445,9 @@ static auto trim_left(std::string_view s) -> std::string_view static auto trim_right(std::string_view s) -> std::string_view { const auto& loc = std::locale(); - const auto start = - std::find_if_not(s.rbegin(), s.rend(), [&loc](auto ch) -> bool { - return std::isspace(ch, loc); - }).base(); + const auto start = std::find_if_not(s.rbegin(), s.rend(), [&loc](auto ch) -> bool { + return std::isspace(ch, loc); + }).base(); s.remove_suffix(std::distance(start, std::end(s))); return s; }