Skip to content
Closed
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
8 changes: 8 additions & 0 deletions include/boost/filesystem/path.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# endif

#include <boost/filesystem/config.hpp>
#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
#include <boost/filesystem/path_traits.hpp> // includes <cwchar>
#include <boost/system/error_code.hpp>
#include <boost/system/system_error.hpp>
Expand Down Expand Up @@ -454,6 +455,11 @@ namespace filesystem

# endif

const std::string u8string() const
{
return string(detail::utf8_codecvt_facet());
}

// ----- generic format observers -----

// Experimental generic function returning generic formatted path (i.e. separators
Expand Down Expand Up @@ -789,6 +795,8 @@ namespace filesystem

inline void swap(path& lhs, path& rhs) { lhs.swap(rhs); }

inline path u8path(const std::string& source) { return path(source, detail::utf8_codecvt_facet()); }

inline path operator/(const path& lhs, const path& rhs) { return path(lhs) /= rhs; }

// inserters and extractors
Expand Down