Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing string_view path method #25

Merged
merged 1 commit into from
Aug 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions include/ghc/filesystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,15 @@ inline path::path(const std::u32string& source, format fmt)
postprocess_path_with_format(_path, fmt);
}

#ifdef __cpp_lib_string_view
template <>
inline path::path(const std::string_view& source, format fmt)
{
_path = detail::toUtf8(std::string(source));
postprocess_path_with_format(_path, fmt);
}
#endif

template <class Source, typename>
inline path u8path(const Source& source)
{
Expand Down