is_placeholder, is_bind_expression added.

[SVN r34468]
This commit is contained in:
Peter Dimov
2006-07-06 13:47:26 +00:00
parent c69a4ad382
commit bfe10df38a
6 changed files with 177 additions and 2 deletions
+28 -2
View File
@@ -19,18 +19,44 @@
// See http://www.boost.org/libs/bind/bind.html for documentation.
//
#include <boost/config.hpp>
#include <boost/is_placeholder.hpp>
namespace boost
{
template<int I> class arg
template< int I > struct arg
{
arg()
{
}
template< class T > arg( T const & /* t */ )
{
// static assert I == is_placeholder<T>::value
typedef char T_must_be_placeholder[ I == is_placeholder<T>::value? 1: -1 ];
}
};
template<int I> bool operator==(arg<I> const &, arg<I> const &)
template< int I > bool operator==( arg<I> const &, arg<I> const & )
{
return true;
}
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
template< int I > struct is_placeholder< arg<I> >
{
enum _vt { value = I };
};
template< int I > struct is_placeholder< arg<I> (*) () >
{
enum _vt { value = I };
};
#endif
} // namespace boost
#endif // #ifndef BOOST_BIND_ARG_HPP_INCLUDED