Is it safe to static_cast<> Glib::VariantBase to a derived type?
- From: Daniel Boles <dboles src gmail com>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: Is it safe to static_cast<> Glib::VariantBase to a derived type?
- Date: Wed, 10 May 2017 20:04:11 +0100
e.g. in a signal handler that receives a VariantBase that I know is of a specific type (e.g. because I registered that type on the action)
It seems to be working for me, so far, but I feel like I might be skipping some GLib magic and living on borrowed time... such as the added stuff in cast_dynamic(). I get why static_cast<> could work, as it changes the methods used to pull the value out of the underlying GObject, but again I also feel like it may not be that simple and it only _happens_ to work right now.
I'm sure if I read the source for another day or two, I could answer this. ;)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]