This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Can someone point me to the correct bug report?
- From: Luca Bacci <luca dot bacci982 at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Sat, 13 Oct 2018 14:00:08 +0200
- Subject: Can someone point me to the correct bug report?
Hi, I think I've hit a bug in g++ that has already been resolved recently,
because it works ok on current g++, but still I encounter it on older
supported distributions and in GitLab CI tests.
typedef int int_alias;
class A
{
public:
operator int();
operator int_alias() const;
};
A::operator int() {
return 0;
}
A::operator int_alias() const {
return 1;
}
When I copmpile it with older g++ I get the error:
error: prototype for ‘A::operator int_alias() const’ does not match any in
class ‘A’
error: candidates are: A::operator int()
error: A::operator int_alias() const
In reality, I am using Gtkmm3. and in my class I have user defined
conversion to Gtk::TreeModel::iterator and Gtk::TreeModel::const_iterator.
In Gtkmm3 Gtk::TreeModel::const_iterator is not a real different type, it
is just a typedef to Gtk::TreeModel::iterator. In Gtkmm4 const_iterator has
become a different type.
Can someone point me to the bug report for this? It would be great to add
this as reference in the commit message. Thank you very much.
Luca