GNOME Bugzilla – Bug 546220
Maybe all derived classes should get their own GType automatically.
Last modified: 2018-05-22 12:08:35 UTC
In some cases we need to call Glib::ObjectBase("somename") to create a new GType for the derived C++ class, sometimes even just using RTTI to get a name. For instance, for derived CellRenderers or TreeModels, though I need to discover why that's really necessary. If it's possible somehow, maybe we should just do this automatically for all derived classes.
We cannot use real RTTI, because during the construction of an object, typeid() will return different results as the construction progresses. The usage of typeid() you are referring to is different, because it is applied directly to the type itself, rather than an object reference. Thus, although the RTTI information is being accessed, it is not actually looked up at runtime because the type is known statically.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glibmm/issues/7.