[Bug c++/88434] operator< should take precedence over template argument in basic.lookup.classref

2018-12-11 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88434

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #3 from Marek Polacek  ---
Since the CWG issue is still "drafting", should we be making any changes at
this time?

[Bug c++/88434] operator< should take precedence over template argument in basic.lookup.classref

2018-12-11 Thread gieseanw+gcc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88434

--- Comment #2 from Andrew Giese  ---
It appears there is a CWG issue for this:
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1835

[Bug c++/88434] operator< should take precedence over template argument in basic.lookup.classref

2018-12-10 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88434

Andrew Pinski  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  ---
>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  struct rank{};

struct A{ int rank; };

template
bool comp_rank(const T , const T ){
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