Can we have an automatically disconnecting 'RAII connection', equivalent of `boost::signals2::scoped_connection`? · Issue #87 · libsigcplusplus/libsigcplusplus · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Can we have an automatically disconnecting 'RAII connection', equivalent of boost::signals2::scoped_connection? #87

Closed
@db-src

Description

@db-src

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      TMZ Celebrity News – Breaking Stories, Videos & Gossip

      Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

      Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

      🎥 Watch TMZ Live

      TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.