commit | 9887da8229417d6bdea96ca42408425bab66e636 | [log] [tgz] |
---|---|---|
author | David Bolvansky <david.bolvansky@gmail.com> | Wed May 09 18:57:17 2018 +0000 |
committer | David Bolvansky <david.bolvansky@gmail.com> | Wed May 09 18:57:17 2018 +0000 |
tree | 24201296e38f35cb9746cc18017bbb425eb8ae4e | |
parent | a382216407036b10a5429441e101823a776f8caa [diff] [blame] |
Allow copy elision in path concatenation Summary: Just port of libstdc++'s fix to libc++ fs: https://github.com/gcc-mirror/gcc/commit/e6ac4004fe49d785c63bf87aec4b095b5ce1d19f Author of fix: Jonathan Wakely Reviewers: EricWF, mclow.lists Reviewed By: EricWF Subscribers: smeenai, christof, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D46593 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@331910 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/experimental/filesystem b/include/experimental/filesystem index a851824..f29e23e 100644 --- a/include/experimental/filesystem +++ b/include/experimental/filesystem
@@ -1140,7 +1140,9 @@ inline _LIBCPP_INLINE_VISIBILITY path operator/(const path& __lhs, const path& __rhs) { - return path(__lhs) /= __rhs; + path __result(__lhs); + __result /= __rhs; + return __result; } template <class _Source>