cplusplus / draft

C++ standards drafts
http://www.open-std.org/jtc1/sc22/wg21/
5.69k stars 749 forks source link

[range.split.view,range.chunk.by.view] public exposition-only member functions? #5891

Open CaseyCarter opened 2 years ago

CaseyCarter commented 2 years ago

There's no reason to make an exposition-only member public; it doesn't really make sense to provide users with access to an unspecified name. LWG has avoided public exposition-only members in the past, but some have managed to sneak into the subject subclauses (split_view's member find-next, and chunk_view's find-next and find-prev). It's not clear to me if this was a deliberate choice by LWG, or simply an oversight that should be corrected in the working draft.

frederick-vs-ja commented 2 years ago

Perhaps related to LWG2310, LWG2743, and LWG3107.

Should we also specify in [objects.within.classes] that "Whenever an exposition only member is referred in another class defined in the standard library, the member is considered accessible." alongwith making all of them private?