our C++ compiler is not happy with the following line of code
return
(Allocation)(Glib::wrap(&gtk_widget_get_allocation(const_cast<GtkWidget*>(gobj()))));

and reported error

The "&" operator can only be applied to a variable or other l-value.

What the author want to do is to get the address of the return value of 
gtk_widget_get_allocation, to
avoid the problem, simply split the code to

  GtkAllocation ga =gtk_widget_get_allocation(const_cast<GtkWidget*>(gobj()));
  return (Allocation)(Glib::wrap(&ga));

Chris




-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gtkmm-03-widget.diff
URL: 
<http://mail.opensolaris.org/pipermail/jds-review/attachments/20080718/eefe27af/attachment.ksh>

Reply via email to