------- Additional Comments From reichelt at gcc dot gnu dot org 2004-12-13 15:55 ------- I just got bitten by this bug, too. Here's an even shorter testcase. If I make bar a non-template function the code snippet compiles.
===================================== struct A { void foo(); }; template<int> void bar(const A& a) { const_cast<A&>(a).foo(); } ===================================== -- What |Removed |Added ---------------------------------------------------------------------------- CC| |reichelt at gcc dot gnu dot | |org Severity|normal |critical Keywords| |monitored Summary|[4.0 Regression] C++ program|[4.0 Regression] C++ program |no longer compiles |no longer compiles http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18949