This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Resolved status.

3239. Hidden friends should be specified more narrowly

Section: [cmp.partialord], [cmp.weakord], [cmp.strongord], 31.12.6 [fs.class.path], [container.node.overview] Status: Resolved Submitter: Daniel Sunderland Opened: 2019-07-19 Last modified: 2021-06-06

Priority: Not Prioritized

View all issues with Resolved status.


LWG has been moving papers which use hidden friends to restrict an entity's lookup to be via ADL only. However, the current wording does not prevent an implementation from making these entities from also being available via (un)qualified lookup.

Walter Brown and I have an unreviewed paper (P1601R0) in the Post Kona mailing specifying that entities which are intended to be found via ADL only include a Remarks element which states something equivalent to the following:

"Remarks: This function is to be found via argument-dependent lookup only."

Adding this element after the draft ships will be a semantic change. Marshall suggested that I file an LWG issue to add/modify Remarks elements where needed to prevent (un)qualified lookup.

The following stable names are places in the pre Cologne draft (N4820) which potentially use hidden friends. Furthermore, there are papers that LWG added to the straw polls which also potentially use hidden friends. LWG should review each of these subsections/papers to determine if they should include the text equivalent to the Remarks above. [Note: Not all these subsections should restrict lookup to ADL only. It is very likely that I missed a paper or subsection — end note].

[2019-11-17; Daniel comments]

The acceptance of P1965R0 at the Belfast 2019 meeting should resolve this issue.

[2019-11; Resolved by the adoption of P1965 in Belfast]

Proposed resolution: