Created on 2018-12-03.00:00:00 last changed 13 months ago
Proposed resolution:
This wording is relative to N4861.
Modify [fs.class.directory.entry], class directory_entry synopsis, as follows:
namespace std::filesystem { class directory_entry { public: […] bool operator==(const directory_entry& rhs) const noexcept; strong_ordering operator<=>(const directory_entry& rhs) const noexcept; // 29.11.11.? [fs.dir.entry.io], inserter template<class charT, class traits> friend basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& os, const directory_entry& d); private: […] }; }
Add a new subclause at the end of [fs.class.directory.entry], as indicated:
29.11.11.? Inserter [fs.dir.entry.io]
template<class charT, class traits> friend basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& os, const directory_entry& d);-?- Effects: Equivalent to: return os << d.path();
[ 2020-11-09 Approved In November virtual meeting. Status changed: Tentatively Ready → WP. ]
[ 2020-08-21 Issue processing telecon: moved to Tentatively Ready ]
[ 2020-05-02; Daniel resyncs wording with recent working draft and comments ]
We have now the paper P1965R0, which introduced a specification of what friend functions in the library specification (see [hidden.friends]) are supposed to mean, there is no longer an inline definition needed to clarify the meaning. In addition to updating the change of section names the provided wording has moved the friend declaration into the public part of the class definition as have done in all other cases where we take advantage of "hidden friends" declarations.
[ 2019-02; Kona Wednesday night issue processing ]
Status to Open; Marshall to move definition inline and re-vote on reflector.
Jonathan to write a paper about how to specify "hidden friends".
Previous resolution [SUPERSEDED]:
This wording is relative to N4778.
Modify [fs.class.directory_entry], class directory_entry synopsis, as follows:
namespace std::filesystem { class directory_entry { public: […] private: filesystem::path pathobject; // exposition only friend class directory_iterator; // exposition only template<class charT, class traits> friend basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& os, const directory_entry& d); }; }Add a new subclause at the end of [fs.class.directory_entry], as follows:
28.11.11.4 Inserter [fs.dir.entry.io]
template<class charT, class traits> friend basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& os, const directory_entry& d);-1- Effects: Equivalent to: return os << d.path();
[ 2018-12-21 Reflector prioritization ]
Set Priority to 2
directory_entry has a conversion function to const path& and depends on path's stream insertion operator for stream insertion support, which is now broken after LWG 2989 made it a hidden friend.
This does not appear to be intended.History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-22 15:47:43 | admin | set | status: wp -> c++23 |
2020-11-09 21:40:50 | admin | set | messages: + msg11557 |
2020-11-09 21:40:50 | admin | set | status: ready -> wp |
2020-08-21 20:56:44 | admin | set | messages: + msg11454 |
2020-08-21 20:56:44 | admin | set | status: open -> ready |
2020-05-02 14:05:50 | admin | set | messages: + msg11256 |
2019-02-21 17:23:36 | admin | set | messages: + msg10322 |
2019-02-21 17:23:36 | admin | set | status: new -> open |
2018-12-21 15:26:00 | admin | set | messages: + msg10262 |
2018-12-04 02:52:00 | admin | set | messages: + msg10246 |
2018-12-03 00:00:00 | admin | create |