aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authornicole mazzuca <mazzucan@outlook.com>2021-01-08 10:46:54 -0800
committerGitHub <noreply@github.com>2021-01-08 10:46:54 -0800
commit36cd5101198e0d05407982ce05e20ca854d12435 (patch)
tree3e947837ca1735e6455e2bb128f0dc87b0db32a0 /toolsrc/include
parent2a42024b53ebb512fb5dd63c523338bf26c8489c (diff)
downloadvcpkg-36cd5101198e0d05407982ce05e20ca854d12435.tar.gz
vcpkg-36cd5101198e0d05407982ce05e20ca854d12435.zip
[vcpkg] Fix build for mingw (#15504)
* fix build * stop the templateness none of the major three implementations have string::const_iterator = char const*
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg/base/files.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h
index 69ec41fe3..e1628eaf0 100644
--- a/toolsrc/include/vcpkg/base/files.h
+++ b/toolsrc/include/vcpkg/base/files.h
@@ -48,20 +48,11 @@ namespace fs
inline path u8path(std::initializer_list<char> il) { return u8path(vcpkg::StringView{il.begin(), il.end()}); }
inline path u8path(const char* s) { return u8path(vcpkg::StringView{s, s + ::strlen(s)}); }
-#if defined(_MSC_VER)
inline path u8path(std::string::const_iterator first, std::string::const_iterator last)
{
- if (first == last)
- {
- return path{};
- }
- else
- {
- auto firstp = &*first;
- return u8path(vcpkg::StringView{firstp, firstp + (last - first)});
- }
+ auto firstp = &*first;
+ return u8path(vcpkg::StringView{firstp, firstp + (last - first)});
}
-#endif
std::string u8string(const path& p);
std::string generic_u8string(const path& p);