This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Intersting C++ error message.
- To: gcc at gcc dot gnu dot org
- Subject: Intersting C++ error message.
- From: Kevin Atkinson <kevinatk at home dot com>
- Date: Thu, 26 Aug 1999 01:36:50 -0400
skip-t.hh:44: warning: choosing `clone_ptr<FilterItrPart>::operator
FilterItrPart *()' over `clone_ptr<FilterItrPart>::operator const
FilterItrPart *() const'
skip-t.hh:44: warning: for conversion from `clone_ptr<FilterItrPart>'
to `const FilterItrPart *'
skip-t.hh:44: warning: because conversion sequence for the argument is
better
Doing so is harmless as the offending methods are.
operator Class * () {return ptr;}
operator const Class * () const {return ptr;}
But, I would like to know:
1) Why does it chose the nonconst method over the const one?
2) Sense this is harmless is there any way to suppress the warning?
-
Kevin Atkinson
kevinatk@home.com
http://metalab.unc.edu/kevina/