[Bug c++/88434] operator< should take precedence over template argument in basic.lookup.classref
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 11 00:04:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88434
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-12-11
Blocks| |12944
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>Semi-related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85570
It might be related in the sense the namelookup of rank is happening a
definition time rather instantation time.
Shorter testcase (without includes):
template <int> struct rank{};
struct A{ int rank; };
template<typename T>
bool comp_rank(const T &a, const T &b){
return a.rank < b.rank;
}
int main()
{
A a{42}, b{0};
comp_rank(a, b);
}
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12944
[Bug 12944] [meta-bug] C++ name-lookup problems
More information about the Gcc-bugs
mailing list