From 11485f89e7e31c2a01c080b8df1c361930c958e0 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 11 Dec 2023 16:08:29 -0500 Subject: [PATCH] Squashed 'externals/coda-oss/' changes from 3770d0758..86ec09d4e 86ec09d4e Merge branch 'main' into cpp17 b173830ca fix C++17 overload resolution git-subtree-dir: externals/coda-oss git-subtree-split: 86ec09d4ef2a2aca28d5a4f24dec6d67fa4bc88b --- 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