is_placeholder question

Jonathan Wakely jwakely.gcc@gmail.com
Sun Nov 20 23:25:00 GMT 2011


On 20 November 2011 23:07, Paolo Carlini wrote:
> On 11/20/2011 11:40 PM, Jonathan Wakely wrote:
>>
>> Do we expect this to work?
>>
>> static_assert( is_placeholder<decltype(placeholders::_1)>::value, "" );
>>
>> It doesn't, because our placeholders are declared const.
>>
>> I'm not sure it's required to work, but it is surprising that it doesn't.
>>
>> We could make it work by adding another is_placeholder partial
>> specialization for const _Placecholder types.
>
> Sounds good to me.

We should probably also make is_bind_expression support const and
volatile qualified objects, given that the call wrapper result of a
bind expression is required to work when cv-qualified (and to
propagate the cv-quals to the target object.)

I'll work on that tomorrow.



More information about the Libstdc++ mailing list