void Gtk::Widget::get_preferred_width pass nullptr



I'm using the function Gtk::Widget::get_preferred_width() in a program, and I noticed something odd in it's documentation on developer.gnome.org.  It specifies it this way:

void Gtk::Widget::get_preferred_width(int &minimum_width, int &natural_width)
minimum_width    Location to store the minimum width, or nullptr.
natural_width    Location to store the natural width, or nullptr.

As I use it I really only want natural_width, but everything I read indicates that passing a nullptr reference is invalid; in fact, I can't even come up with code to do so that gcc will compile.  What is the intended way to pass nullptr to this function?  For now I'm just giving a real int to minimum_width and not using it.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]