GNOME Bugzilla – Bug 568074
class PaperSize contains multiple default constructors
Last modified: 2009-01-19 11:47:38 UTC
Please describe the problem: PaperSize contains 2 default constructors. In papersize.hg, there is only one default constructors: papersize.hg line 55: explicit PaperSize(const Glib::ustring& name = ""); However, in the generated papersize.h, there is one more default constrctor: papersize.h line 102: PaperSize(); This cause warning C4520 in Visual Studio 2008: c:\program files\gtkmm\include\gtkmm-2.4\gtkmm\papersize.h(265) : warning C4520: 'Gtk::PaperSize' : multiple default constructors specified The problem could be fixed by remove the default value in papersize.hg: Index: gtk/src/papersize.hg =================================================================== --- gtk/src/papersize.hg (revision 1072) +++ gtk/src/papersize.hg (working copy) @@ -52,7 +52,7 @@ // Allowing no argument works because gtk_paper_size_new() will call // gtk_paper_size_get_default() in case of NULL. /// If a name is not specified, a default value will be used. - explicit PaperSize(const Glib::ustring& name = ""); + explicit PaperSize(const Glib::ustring& name); explicit PaperSize(const Glib::ustring& ppd_name, const Glib::ustring& ppd_display_name, double width, double height); explicit PaperSize(const Glib::ustring& name, const Glib::ustring& display_name, double width, double height, Unit unit); Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Thanks. Fixed in svn trunk. Note that the default constructor does something very different. get_default() is the actual equivalent of name="" with that constructor.