cpp-proposals-pub icon indicating copy to clipboard operation
cpp-proposals-pub copied to clipboard

P2689R2: LEWG review 2023/04/04

Open mhoemmen opened this issue 2 years ago • 2 comments

@crtrott @dalg24 @nliber

It's possible, using the current wording in terms of an exposition-only atomic-ref-bound, to find and use the atomic-ref-bound class template. Just because users can't name it, doesn't mean that it isn't visible. This would hinder other implementations (e.g., separate classes for each memory order).

LEWG suggested adding this discussion to the paper, to make the history clear and explain why we didn't expose the name of this exposition-only class template.

mhoemmen avatar Apr 04 '23 15:04 mhoemmen

@mhoemmen I am unclear on how it is more visible to users because it is in the C++ standard.

In general, users can find and use anything they can see in a standard library implementation, but they can't count on that name being portable between library versions or between different library vendors. Why is this different?

For instance, implementations use things like private base classes to implement common APIs, but if a user also uses that private base class, that is at their own risk.

nliber avatar Apr 04 '23 15:04 nliber

@nliber The above was just a summary of the concern expressed in LEWG. It's not my concern : - )

mhoemmen avatar Apr 04 '23 15:04 mhoemmen