[Bug c++/45501] Compiler does not find template function if member is addressed with "this"

2021-07-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45501

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|NEW |RESOLVED
   Target Milestone|--- |7.0
 Resolution|--- |FIXED

--- Comment #5 from Andrew Pinski  ---
Fixed in GCC 7 and above.

[Bug c++/45501] Compiler does not find template function if member is addressed with this

2010-09-03 Thread paolo dot carlini at oracle dot com


--- Comment #4 from paolo dot carlini at oracle dot com  2010-09-03 09:09 
---
Ah, ok, thanks Jason.


-- 


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



[Bug c++/45501] Compiler does not find template function if member is addressed with this

2010-09-02 Thread paolo dot carlini at oracle dot com


--- Comment #1 from paolo dot carlini at oracle dot com  2010-09-02 17:16 
---
Since PrintTextFrom is a template, you can (should) write:

  this-prn.template PrintTextFrom MetaObjObj ();

which works with both compilers. Since apparently ICC 11.1 likes in strict mode
also the form without 'template' let's ask Jason if we are right in rejecting
it (while accepting it without this-)


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 CC||jason at gcc dot gnu dot org


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



[Bug c++/45501] Compiler does not find template function if member is addressed with this

2010-09-02 Thread paolo dot carlini at oracle dot com


--- Comment #2 from paolo dot carlini at oracle dot com  2010-09-02 17:44 
---
As a matter of fact, basing on my rough understanding of '.template', GCC may
well be correct: my rule of thumb is that 'template' is required when the
construct before the period depends on a template parameter: by itself prn,
being a Printer, doesn't; this-prn does, because this points to a
MultiInfoPrinter.


-- 


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



[Bug c++/45501] Compiler does not find template function if member is addressed with this

2010-09-02 Thread jason at gcc dot gnu dot org


--- Comment #3 from jason at gcc dot gnu dot org  2010-09-03 01:36 ---
prn and this-prn are equivalent.  Specifically, the type of *this is the
current scope, so although it is a dependent type it is not a dependent scope
and .template should not be needed.


-- 

jason at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-09-03 01:36:05
   date||


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