`Cancellable` class should have a default constructor for invalid objects
The documentation of many cancellable methods is wrong, in that it documents the cancellable
parameter as such (see here for an example)
cancellable A Cancellable or nullptr.
but it's impossible to pass nullptr
where the method requires a const reference. The C++ way of doing it (and this is what I'd like to do in my client library) would be to have the method take a default parameter, like this:
void do_something(
...params...,
const Glib::RefPtr<Gio::Cancellable> &cancellable = Gio::Cancellable());
where the Gio::Cancellable()
constructor constructs an invalid cancellable object, which internally stores a NULL
GCancellable. Would it be possible to add that? (and of course, also a bool is_valid() const
method)