PR libstdc++/85671 allow copy elision in path concatenation
commite6ac4004fe49d785c63bf87aec4b095b5ce1d19f
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 May 2018 17:26:28 +0000 (7 17:26 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 May 2018 17:26:28 +0000 (7 17:26 +0000)
tree22ec0214ed49d618214ea821153e5f60692eb169
parent8233ba7ddfd733d2c7ce773f7e6bb44de6418474
PR libstdc++/85671 allow copy elision in path concatenation

By performing the /= operation on a named local variable instead of a
temporary the copy made for the return value can be elided.

PR libstdc++/85671
* include/bits/fs_path.h (operator/): Permit copy elision.
* include/experimental/bits/fs_path.h (operator/): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@260009 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/fs_path.h
libstdc++-v3/include/experimental/bits/fs_path.h