bind1st fails to compile when argument type is a constant reference

Krzysztof Żelechowski giecrilj@stegny.2a.pl
Sat Nov 19 12:21:00 GMT 2011


Użytkownik Jonathan Wakely napisał:
> 2011/11/19 Krzysztof Żelechowski:
>> I did read the issue.  It is still open, the fix is a suggested fix, there
>> are arguments against the fix on reflector which I do not have access to so
>> I do not know whether the arguments are the same as the mine.  The fix is
>> required by Stroustrup's book, not by the standard.  If removing it would
>> break existing code, it is possible to guard it as an optional fragment with
>> a macro.
> Er, no.
>
> "This document contains only library issues which have been closed by
> the Library Working Group (LWG) after being found to be defects in the
> standard."
>
> It's in the standard.
It is in the committee draft 
<http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#CD1>.  The 
compiler in TR1 mode is not obliged to comply with it, and should do it 
only as far as it is reasonable to do so.  It is not clear what is 
reasonable in this case, in that it involves a tradeoff between general 
applicability and Stroustrup's use case.
>> And yes, in order to implement a clean fix you need to use metaprogramming
>> features of TR1, so it is more reasonable to use |tr1:: bind| instead.  The
>> only problem with that is it is insufficiently documented in API.
> I'll improve the docs.
Thanks.
Chris



More information about the Libstdc++ mailing list