I'm wondering about this for a project I'm writing. Would this be
considered bad style? It's certainly possible (as signal is copyable, and
many mm classes return it by value from non-const methods), but is it bad
design for any reason?

My line of thought is that the signals only observe the object that emits
them, so registering to be notified of changes is not modifying the emitter.

Letting a const instance return signals for observers to connect to would
mean that I would not have to e.g. pass my model objects to my view objects
by non-const reference, which I don't like the look of and can result in me
having to cascade that non-constness all over the place.

Any thoughts welcome!
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to