On Fri, Aug 22, 2008 at 05:34:30PM +0100, Andrew Haley wrote: > >> I'm having a problem with GCC 2.95.3 that appears to be a compiler > >> bug.
The handling of overloads with respect to const and non-const modifiers on pointers was badly broken in gcc 2.95.3. That compiler accepted so much crud that if you learned C++ by writing code that it would accept, you haven't learned C++. (It did OK with correct C++ that was within its limitations, for the most part, the problem was with all the things it accepted that it should have rejected). Your options are to fix your code (so that you always give any non-const references an exactly matching type), "fix" the compiler yourself ("fix" is in quotes since you want the compiler to accept non-standard code and interpret it in a non-standard way), or hire someone to fix it for you.