[libcxx] r331910 - Allow copy elision in path concatenation
David Bolvansky via cfe-commits
cfe-commits at lists.llvm.org
Wed May 9 11:57:17 PDT 2018
Author: xbolva00
Date: Wed May 9 11:57:17 2018
New Revision: 331910
URL: http://llvm.org/viewvc/llvm-project?rev=331910&view=rev
Log:
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
Modified:
libcxx/trunk/include/experimental/filesystem
Modified: libcxx/trunk/include/experimental/filesystem
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/experimental/filesystem?rev=331910&r1=331909&r2=331910&view=diff
==============================================================================
--- libcxx/trunk/include/experimental/filesystem (original)
+++ libcxx/trunk/include/experimental/filesystem Wed May 9 11:57:17 2018
@@ -1140,7 +1140,9 @@ bool operator>=(const path& __lhs, const
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>
More information about the cfe-commits
mailing list