This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
is_placeholder question
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Sun, 20 Nov 2011 22:40:20 +0000
- Subject: 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.)