Skip to content

Commit

Permalink
Merge pull request #25 from karjonas/string_view
Browse files Browse the repository at this point in the history
Fix missing string_view path specialization for C++17 support
  • Loading branch information
gulrak authored Aug 15, 2019
2 parents b652667 + af3d35c commit 4b10425
Showing 1 changed file with 9 additions and 0 deletions.
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

0 comments on commit 4b10425

Please sign in to comment.