From b173830ca9d9946bc4375786bd39abfdbc2ed9c9 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 11 Dec 2023 16:06:21 -0500 Subject: [PATCH] fix C++17 overload resolution --- modules/c++/sys/include/sys/Path.h | 6 +++--- modules/c++/sys/source/Path.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/c++/sys/include/sys/Path.h b/modules/c++/sys/include/sys/Path.h index 74d78af5c..cb1ba14c8 100644 --- a/modules/c++/sys/include/sys/Path.h +++ b/modules/c++/sys/include/sys/Path.h @@ -298,9 +298,9 @@ class CODA_OSS_API Path std::ostream& operator<<(std::ostream& os, const sys::Path& path); std::istream& operator>>(std::istream& os, sys::Path& path); -// Convert between collections of paths as strings and sys::filesystem::path -CODA_OSS_API std::vector convertPaths(coda_oss::span); -CODA_OSS_API std::vector convertPaths(coda_oss::span); +// Convert between collections of paths as strings and coda_oss::filesystem::path +CODA_OSS_API std::vector convertPaths(coda_oss::span); +CODA_OSS_API std::vector convertPaths(coda_oss::span); template inline auto convertPaths(const std::vector& paths) { diff --git a/modules/c++/sys/source/Path.cpp b/modules/c++/sys/source/Path.cpp index 99233b236..510e3c4c0 100644 --- a/modules/c++/sys/source/Path.cpp +++ b/modules/c++/sys/source/Path.cpp @@ -849,6 +849,8 @@ std::string Path::expandEnvironmentVariables(const std::string& path, fs::file_t bool unused_checkIfExists = true; return expandEnvironmentVariables_(path, unused_checkIfExists, &type); } +} // sys + template inline auto convertPaths_(coda_oss::span paths, TFunc fun) @@ -857,13 +859,11 @@ inline auto convertPaths_(coda_oss::span paths, TFunc fun) std::transform(paths.begin(), paths.end(), std::back_inserter(retval), fun); return retval; } -std::vector convertPaths(coda_oss::span paths) +std::vector sys::convertPaths(coda_oss::span paths) { return convertPaths_(paths, [](const auto& p) { return p.string(); }); } -std::vector convertPaths(coda_oss::span paths) +std::vector sys::convertPaths(coda_oss::span paths) { return convertPaths_(paths, [](const auto& p) { return p; }); } - -} \ No newline at end of file