fix overload ambiguity

This commit is contained in:
otavepto 2024-04-14 18:47:12 +02:00
parent f50db936e2
commit c9f6bc8487
2 changed files with 4 additions and 4 deletions

View File

@ -294,14 +294,14 @@ bool common_helpers::dir_exist(const std::filesystem::path &dirpath)
return false;
}
bool common_helpers::dir_exist(const std::string_view &dirpath)
bool common_helpers::dir_exist(const std::string &dirpath)
{
if (dirpath.empty()) return false;
std::filesystem::path path(dirpath);
return dir_exist(path);
}
bool common_helpers::dir_exist(const std::wstring_view &dirpath)
bool common_helpers::dir_exist(const std::wstring &dirpath)
{
if (dirpath.empty()) return false;
std::filesystem::path path(dirpath);

View File

@ -55,7 +55,7 @@ bool file_size(const std::string &filepath, size_t &size);
bool file_size(const std::wstring &filepath, size_t &size);
bool dir_exist(const std::filesystem::path &dirpath);
bool dir_exist(const std::string_view &dirpath);
bool dir_exist(const std::wstring_view &dirpath);
bool dir_exist(const std::string &dirpath);
bool dir_exist(const std::wstring &dirpath);
}