summaryrefslogtreecommitdiffstats
path: root/libcxx/include/experimental/filesystem
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/experimental/filesystem')
-rw-r--r--libcxx/include/experimental/filesystem2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcxx/include/experimental/filesystem b/libcxx/include/experimental/filesystem
index 10590a8c067..45de0d19cb5 100644
--- a/libcxx/include/experimental/filesystem
+++ b/libcxx/include/experimental/filesystem
@@ -759,6 +759,8 @@ private:
public:
// appends
path& operator/=(const path& __p) {
+ _LIBCPP_ASSERT(!__p.has_root_name(),
+ "cannot append to a path with a root name");
__append_sep_if_needed(__p.empty() ? char{} : __p.__pn_[0]);
__pn_ += __p.native();
return *this;
OpenPOWER on IntegriCloud