Commit 4894e316 by Jonathan Wakely Committed by Jonathan Wakely

LWG 3171: restore stream insertion for filesystem::directory_entry

	* include/bits/fs_dir.h (operator<<): Overload for directory_entry,
	as per LWG 3171.
	* testsuite/27_io/filesystem/directory_entry/lwg3171.cc: New test.

From-SVN: r267238
parent fb601354
2018-12-18 Jonathan Wakely <jwakely@redhat.com>
* include/bits/fs_dir.h (operator<<): Overload for directory_entry,
as per LWG 3171.
* testsuite/27_io/filesystem/directory_entry/lwg3171.cc: New test.
* src/filesystem/std-dir.cc (filesystem::_Dir::advance): Move new
path instead of copying.
......
......@@ -300,6 +300,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
friend class directory_iterator;
friend class recursive_directory_iterator;
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 3171. LWG 2989 breaks directory_entry stream insertion
template<typename _CharT, typename _Traits>
friend basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const directory_entry& __d)
{ return __os << __d.path(); }
directory_entry(const filesystem::path& __p, file_type __t)
: _M_path(__p), _M_type(__t)
{ }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment