This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/53573] template type dependent name resolution broken


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53573

--- Comment #16 from Keean Schupke <keean@fry-it.com> 2012-06-05 11:53:32 UTC ---
(In reply to comment #14)

Basic.lookup.argdep is not specific to templates, so why does the dependent
lookup work outside of templates?

int g(int x) {
    return x - 1;
}

double g(double x) {
    return x + 1.0L;
}

main() {
    int x(g(1.0L));
}

why does ADL work here if [basic.lookup.argdep] means what you imply?




> [temp.dep.res] says dependent name resolution considers declarations visible at
> the point of definition, and declarations from associated namespaces from the
> instantiation context and the definition context.
> 
> [basic.lookup.argdep]/2 says "If T is a fundamental type, its associated sets
> of namespaces and classes are both empty."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]