Movatterモバイル変換


[0]ホーム

URL:


Issue 33 - WG21 CWG Issues
Title
Argument dependent lookup and overloaded functions
Status
tc1
Section
6.5.4 [basic.lookup.argdep]
Submitter
Jason Merrill

Created on1998-07-15.00:00:00 last changed277 months ago

Messages

msg204 (view)
Date: 1999-04-15.00:00:00

Proposed Resolution (04/99):In 6.5.4 [basic.lookup.argdep] paragraph 2,add following the last bullet in the list of associated classes and namespacesfor various argument types (not a bullet itself because overload sets andtemplates do not have a type):

In addition, if the argument is the name or address of a setof overloaded functions and/or function templates, its associated classesand namespaces are the union of those associated with each of the membersof the set: the namespace in which the function or function template isdefined and the classes and namespaces associated with its (non-dependent)parameter types and return type.
msg5 (view)
Date: 2022-11-20.07:54:16

If an argument used for lookup is the address of a group of overloadedfunctions, are there any associated namespaces or classes? What if it'sthe address of a function template?

My inclination is to say no to both.

From Mike Miller:

We discussed this on the reflector a few weeks ago. I'll leave the templatecase for the Core III experts, but I'd find it surprising if the overloadcase weren't handled as the obvious generalization of the single-functioncase. For a single function, the associated namespaces are those of thetypes used in the parameters and return type; I would expect that usingan overloaded function name would simply be the union of the namespacesfrom the members of the overload set. That would be the simplest and mostintuitive, IMHO — is there an argument for doing it differently?

Proposed Resolution (04/99):In 6.5.4 [basic.lookup.argdep] paragraph 2,add following the last bullet in the list of associated classes and namespacesfor various argument types (not a bullet itself because overload sets andtemplates do not have a type):

In addition, if the argument is the name or address of a setof overloaded functions and/or function templates, its associated classesand namespaces are the union of those associated with each of the membersof the set: the namespace in which the function or function template isdefined and the classes and namespaces associated with its (non-dependent)parameter types and return type.
History
DateUserActionArgs
2003-04-25 00:00:00adminsetstatus: dr -> tc1
1999-09-14 00:00:00adminsetmessages: +msg204
1999-09-14 00:00:00adminsetstatus: review -> dr
1998-07-15 00:00:00admincreate

[8]ページ先頭

©2009-2026 Movatter.jp