* include/experimental/bits/fs_dir.h (__directory_iterator_proxy):
Overload operator* to move from rvalues.
From-SVN: r236078
2016-05-10 Jonathan Wakely <jwakely@redhat.com>
+ * include/experimental/bits/fs_dir.h (__directory_iterator_proxy):
+ Overload operator* to move from rvalues.
+
PR libstdc++/71036
* src/filesystem/ops.cc (create_dir): Handle EEXIST from mkdir.
* testsuite/experimental/filesystem/operations/create_directory.cc:
struct __directory_iterator_proxy
{
- const directory_entry& operator*() const noexcept { return _M_entry; }
+ const directory_entry& operator*() const& noexcept { return _M_entry; }
+
+ directory_entry operator*() && noexcept { return std::move(_M_entry); }
private:
friend class directory_iterator;