#ifndef BOOST_COMPUTE_FUNCTIONAL_IDENTITY_HPP
#define BOOST_COMPUTE_FUNCTIONAL_IDENTITY_HPP
namespace boost {
namespace compute {
namespace detail {
template<class T, class Arg>
struct invoked_identity
{
typedef T result_type;
invoked_identity(const Arg &arg)
: m_arg(arg)
{
}
Arg m_arg;
};
}
template<class T>
class identity
{
public:
typedef T result_type;
identity()
{
}
template<class Arg>
detail::invoked_identity<T, Arg> operator()(const Arg &arg) const
{
return detail::invoked_identity<T, Arg>(arg);
}
};
} }
#endif