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++/52978] Inherit from Template with specified type and override virtual function


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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-13 20:48:13 UTC ---
No, that's absolutely not how C++ works.  Templates are not macros.

The template's function parameter is "const T&" aka "T const&"
i.e. a reference to a const T

If T is a pointer then it is a reference to a const pointer.  That's not the
same as a reference to a pointer to const.

http://www.parashift.com/c++-faq-lite/const-correctness.html#faq-18.4


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