Description
I have a few times wanted a connection
that automatically disconnect()
s itself when it goes out of scope and is destructed, via RAII.
boost::signals2
offers this:
boost::signals2::scoped_connection — Limits a signal-slot connection lifetime to a particular scope.
It would be handy if we had the same here, not only because it's useful, but also because I believe sigc++
was at one point based on the original boost::signals
(?) and is at the outline level mostly compatible, perhaps with small changes... so this would hopefully be only a small bit of work to bring us up to feature par with it.
Would it be possible therefore for us to get a sigc::scoped_connection
or similar?
If yes, I should be able to look at developing this, unless someone else wants to. :-)
Thanks in advance!