From: poy <po...@12...> - 2008-07-08 13:02:05
|
i asked about this in ##iso-c++ on freenode and opinions were mitigated; but we agreed on concluding that using default arguments with binders is undocumented and that one shouldn't rely on it. the tr1 draft doesn't mention any default argument. however, the current C++0x draft (http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2691.pdf) contains (page 180): "The return type, the parameter-type-list, the ref-qualifier, and the cv-qualifier-seq, but not the default arguments (8.3.6) or the exception specification (15.4), are part of the function type. [ Note: function types are checked during the assignments and initializations of pointer-to-functions, reference-to-functions, and pointer-to-member-functions. -end note ]" so in order to get rid of these default arguments, i think Pär's patch is the best option. (attached is the chat log, if anyone's interested...) poy ----- Original Message ----- From: "Pär Björklund" <per...@gm...> To: "Patches & development discussion" <dcp...@li...> Sent: Monday, July 07, 2008 12:22 AM Subject: Re: [dcplusplus-devel] Patch: made SearchFrame::openWindowcompilable in gcc and msvc >I know that the provided patch is not pretty so it would be nice if > someone else could verify my results as well. > > MSVC seems to be ok with removing the default values. > g++ still complains about unresolved overload even if the default > values are removed. > > On Sun, Jul 6, 2008 at 10:44 PM, Jacek Sieka <arn...@gm...> > wrote: >> >> I think a better solution would be to remove the defaults on the >> parameters, no? Otherwise both are reasonable candidates if you have only >> one parameter (I have no intention of investigating what the standard >> actually says in this case). I have neither msvc nor gcc4.3 so I can't >> verify it though... >> >> /J >> >> On Sat, Jul 5, 2008 at 1:35 PM, Pär Björklund <per...@gm...> >> wrote: >>> >>> Well the subject says it all. Fixed the SearchFrame::openWindow to >>> compile with both g++ 4.3 alpha and msvc 9. Had to resort to creating >>> two separate functions to avoid the unambiguous overload error. >>> >>> >>> ------------------------------------------------------------------------- >>> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! >>> Studies have shown that voting for your favorite open source project, >>> along with a healthy diet, reduces your potential for chronic lameness >>> and boredom. Vote Now at http://www.sourceforge.net/community/cca08 >>> _______________________________________________ >>> dcplusplus-devel mailing list >>> dcp...@li... >>> https://lists.sourceforge.net/lists/listinfo/dcplusplus-devel >>> >> >> >> ------------------------------------------------------------------------- >> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! >> Studies have shown that voting for your favorite open source project, >> along with a healthy diet, reduces your potential for chronic lameness >> and boredom. Vote Now at http://www.sourceforge.net/community/cca08 >> _______________________________________________ >> dcplusplus-devel mailing list >> dcp...@li... >> https://lists.sourceforge.net/lists/listinfo/dcplusplus-devel >> > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > dcplusplus-devel mailing list > dcp...@li... > https://lists.sourceforge.net/lists/listinfo/dcplusplus-devel > > |