Files

70 lines
1.3 KiB
C++
Raw Permalink Normal View History

2002-01-30 11:29:28 +00:00
#ifndef BOOST_BIND_ARG_HPP_INCLUDED
#define BOOST_BIND_ARG_HPP_INCLUDED
2003-11-28 15:35:21 +00:00
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
2003-06-12 17:09:24 +00:00
# pragma once
2002-01-30 11:29:28 +00:00
#endif
//
// bind/arg.hpp
//
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
2002-01-30 11:29:28 +00:00
//
// See http://www.boost.org/libs/bind/bind.html for documentation.
//
2006-07-06 13:47:26 +00:00
#include <boost/config.hpp>
#include <boost/is_placeholder.hpp>
2013-12-07 12:09:22 +01:00
2002-01-30 11:29:28 +00:00
namespace boost
{
template<bool Eq> struct _arg_eq
{
};
template<> struct _arg_eq<true>
{
typedef void type;
};
2006-07-06 13:47:26 +00:00
template< int I > struct arg
2002-01-30 11:29:28 +00:00
{
BOOST_CONSTEXPR arg()
2006-07-06 13:47:26 +00:00
{
}
template< class T > BOOST_CONSTEXPR arg( T const & /* t */, typename _arg_eq< I == is_placeholder<T>::value >::type * = 0 )
2006-07-06 13:47:26 +00:00
{
}
2002-01-30 11:29:28 +00:00
};
template< int I > BOOST_CONSTEXPR bool operator==( arg<I> const &, arg<I> const & )
{
return true;
}
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
2006-07-06 13:47:26 +00:00
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
2006-07-06 13:47:26 +00:00
2002-01-30 11:29:28 +00:00
} // namespace boost
#endif // #ifndef BOOST_BIND_ARG_HPP_INCLUDED