forked from OSchip/llvm-project
Allow copy elision in path concatenation
Summary:
Just port of libstdc++'s fix to libc++ fs: e6ac4004fe
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
llvm-svn: 331910
This commit is contained in:
parent
762d498808
commit
b89605db01
|
@ -1140,7 +1140,9 @@ bool operator>=(const path& __lhs, const path& __rhs) _NOEXCEPT
|
|||
|
||||
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>
|
||||
|
|
Loading…
Reference in New Issue