Created on 2023-07-15.00:00:00 last changed 1 week ago
Proposed resolution:
This wording is relative to N4993.
Modify [contents] as indicated:
-3- Whenever an unqualified name other than `swap`, `make_error_code`, `make_error_condition`, `from_stream`, or `submdspan_mapping` is used in the specification of a declaration `D` in Clause 17 through Clause 33 or Annex D, its meaning is established as-if by performing unqualified name lookup ([basic.lookup.unqual]) in the context of `D`.
[Note 1: Argument-dependent lookup is not performed. — end note]
Similarly, the meaning of a qualified-id is established as-if by performing qualified name lookup ([basic.lookup.qual]) in the context of `D`.
[Example 1: The reference to `is_array_v` in the specification of `std::to_array` ([array.creation]) refers to `::std::is_array_v`. — end example]
[Note 2: Operators in expressions ([over.match.oper]) are not so constrained; see [global.functions]. — end note]
The meaning of the unqualified name `swap` is established in an overload resolution context for swappable values ([swappable.requirements]). The meanings of the unqualified names `make_error_code`, `make_error_condition`, `from_stream`, and `submdspan_mapping` are established as-if by performing argument-dependent lookup ([basic.lookup.argdep]).
[ 2024-12-09; Reflector poll ]
Set status to Tentatively Ready after six votes in favour during reflector poll.
[ 2024-12-02; Jonathan provides wording ]
I suggest that `from_stream` should only be found via ADL, not unqualified lookup. This is consistent with what we did for `make_error_code` and `make_error_condition`, and more recently for `submdspan_mapping`. I see no reason to treat `from_stream` differently. This implies that implementations might need a poison poll in `std::chrono` so that unqualified lookup stops as soon as those are found.
[ 2023-10-30; Reflector poll ]
Set priority to 3 after reflector poll.
[time.parse] says: "Each parse
overload specified
in this subclause calls from_stream
unqualified,
so as to enable argument dependent lookup ([basic.lookup.argdep])."
That name should be added to [contents] along with
swap
,
make_error_code
, and
make_error_condition
.
We should decide whether calls to from_stream
should use normal
lookup (i.e. unqualified lookup plus ADL) or just ADL, as was done for
make_error_code
and make_error_condition
(see LWG 3629).
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-12-09 16:09:35 | admin | set | messages: + msg14517 |
2024-12-09 16:09:35 | admin | set | status: new -> ready |
2024-12-02 14:24:20 | admin | set | messages: + msg14504 |
2024-12-02 14:24:20 | admin | set | messages: + msg14503 |
2023-10-30 16:39:42 | admin | set | messages: + msg13782 |
2023-07-15 00:00:00 | admin | create |