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