[PATCH] D46593: Allow copy elision in path concatenation
Dávid Bolvanský via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 8 11:34:22 PDT 2018
xbolva00 updated this revision to Diff 145742.
Herald added a subscriber: christof.
https://reviews.llvm.org/D46593
Files:
libcxx/trunk/include/experimental/filesystem
Index: libcxx/trunk/include/experimental/filesystem
===================================================================
--- libcxx/trunk/include/experimental/filesystem
+++ libcxx/trunk/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>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46593.145742.patch
Type: text/x-patch
Size: 470 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180508/91694e77/attachment.bin>
More information about the cfe-commits
mailing list