This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

is_placeholder question


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.

(This came up because I am making std::is_placeholder true for TR1
placeholders, and vice versa, so users can mix'n'match std::bind with
tr1::bind and have it all work nicely, and I wrote an assertion like
that in a new test.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]