Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove friend class from the library wording #6427

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

frederick-vs-ja
Copy link
Contributor

Fixes #5906.

class \tcode{directory_iterator}\iref{fs.class.directory.iterator}
is shown above as a friend of class \tcode{directory_entry}.
Friendship allows the \tcode{directory_iterator} implementation to cache
\tcode{directory_iterator} is allowed to cache
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we allowed to say "allowed"?
Should this be turned into a "Recommended practice" note and say something like "Implementations of directory_iterator are encouraged to populate attributes of the directory_entry object upon construction, without calling refresh()"?
OTOH does this note actually mean anything at all? Implementations are always encouraged to omit "unneeded" code; we don't have to tell them that, do we?

@@ -9222,7 +9222,6 @@

// bit reference
class @\libmember{reference}{vector<bool>}@ {
friend class vector;
constexpr reference() noexcept;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This private constructor declaration is probably observable because of something about SFINAE/overload-resolution. But I doubt that its constexpr and noexcept specifiers are observable.

(Similarly below, the fact that the copy ctor is =defaulted is unobservable, but perhaps it should be marked noexcept. Right now its noexceptness depends on the nothrow-copyability of this class's unseen data members.)

Same comments on bitset::reference below.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So? This pull request is not about the private default constructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[format.arg] remove friend declaration from basic_format_arg::handle
3 participants