C++: const and typedef
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Wed Jul 5 13:47:00 GMT 2000
> It seams that the const keyword in definition on titi::test is
> forgotten.
Thanks for your bug report. This is not a bug in the compiler, but in
your code. test has a parameter of type "char*const", and you want to
pass it to a function expecting "const char*" (i.e. "char
const*"). This does not work. The top-level const is not "forgotten",
it just doesn't matter.
If you question this analysis, please discuss it in one of the public
C++ fora first, eg. comp.lang.c++.moderated, or comp.std.c++.
Regards,
Martin
More information about the Gcc-bugs
mailing list