Class scoped_connection

boost::signalslib::scoped_connection — Limits a signal-slot connection lifetime to a particular scope.

Synopsis

class scoped_connection : public connection,
                          private noncopyable   // Exposition only
{
public:
  // construct/copy/destruct
  scoped_connection(const connection&);
  ~scoped_connection();
};

Description

A connection which automatically disconnects on destruction.

scoped_connection public construct/copy/destruct

  1. scoped_connection(const connection& other);
    Effects:

    this references the connection referenced by other.

    Throws:

    Will not throw.

  2. ~scoped_connection();
    Effects:

    If this->connected(), disconnects the signal-slot connection.