Takes ownership of an observer and automatically detaches it on scope exit.
template <typename D>
class ScopedObserver
{
public:
// Constructs instance from observer
ScopedObserver(Observer<D>&& obs);
// Move constructor
ScopedObserver(ScopedObserver&& other);
// Destructor
~ScopedObserver();
// Assignment
ScopedObserver& operator=(ScopedObserver&& other); // Move
// Tests if this instance is linked to a node
bool IsValid() const;
// Sets weight override for linked node
void SetWeightHint(WeightHint hint);
};