On Sat, 13 Oct 2018 at 13:01, Luca Bacci <luca.bacci982@xxxxxxxxx> wrote: > > 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. It was fixed by commit https://gcc.gnu.org/r251340 which doesn't reference any bug report.