bind1st fails to compile when argument type is a constant reference
Krzysztof Żelechowski
giecrilj@stegny.2a.pl
Sat Nov 19 08:03:00 GMT 2011
Użytkownik Jonathan Wakely napisaÅ:
> 2011/11/18 Krzysztof Żelechowski:
>> The fix is would be to remove the LWG "fix" of Issue 109 from ::std::
>> bind1st which is implemented verbatim.
> Yes, because that's what the standard requires.
>
> If you remove that, you break other code - did you even read the issue?
>
> Clearly that's not a fix.
>
> You already stated you've figured out how to use tr1::bind instead,
> that's easier to use and more flexible anyway.
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.
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.
Thanks,
Chris
More information about the Libstdc++
mailing list