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++/69753] [6 Regression] bogus: expected primary-expression before â>â token


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69753

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Is this actually bogus?

[over.call.func] says:

If the keyword this (9.3.2) is in scope and refers to class T, or a derived
class of T, then the implied object argument is (*this). If the keyword this is
not in scope or refers to another class, then a contrived object of type
T becomes the implied object argument.


So according to that, "auto guest = A::FromWebContents();" becomes "auto guest
= this->A::FromWebContents();" right?

This makes "guest" dependent and so is actually "guest->As<T> ();" is invalid. 
It has it be "guest->template As<T> ();"

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