bind1st fails to compile when argument type is a constant reference

Krzysztof Żelechowski giecrilj@stegny.2a.pl
Sun Nov 20 12:08:00 GMT 2011


Użytkownik Jonathan Wakely napisał:
> 2011/11/19 Krzysztof Żelechowski:
>> It is in the committee draft
>> <http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#CD1>.
> And the standard.  Have you actually looked at the standard to check?
>
> Status CD1 means it was integrated into the working paper before the
> "CD1" version which was three years ago now. In case you missed the
> news, there's been a new standard since then.  It is in the C++11
> standard.
It is irrelevant for the default mode of v4.4, and, moreover, once GNU 
C++ switches to the new standard by default, |std:: bind1st |will be 
deprecated, and the issue will go away by itself except for customers 
with an old code base and unwilling to move forward, but in that case 
they have probably bumped into it already and accordingly know how to 
deal with it.
>
>>   The
>> compiler in TR1 mode
> There is no "TR1 mode", the compiler knows nothing about TR1, it's
> purely a library and is not a standard.
It was a shortcut for "in a mode corresponding to the language state of 
the time when TR1 was released".
>
>> is not obliged to comply with it, and should do it only
>> as far as it is reasonable to do so.
> It's in the standard.
>
> Did I mention it's in the standard?  I think I did. In case you missed
> it: it's in the standard.
I am happy to hear that, and I am looking forward to having a compiler 
implicitly supporting e.g. |decltype| and a wider range of compile-time 
constants in the default mode.
>>   It is not clear what is reasonable in
>> this case, in that it involves a tradeoff between general applicability and
>> Stroustrup's use case.
> You seem to imply Stroustrup's use case is some kind of weird, unusual
> case.  It's not.
But neither is general applicability, hence the tradeoff.

Thanks,
Chris



More information about the Libstdc++ mailing list