------- Comment #1 from pinskia at gcc dot gnu dot org 2005-12-21 22:54 -------
GCC is correct:
const PTR mycast(const A *a) {
return (static_cast<const PTR>(a));
a is a pointer to a const A. While the cast you are trying to use is a
constant pointer to B. And that is invalid C++ to use static_cast to remove a
const.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25525