Can someone point me to the correct bug report?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux