123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #ifndef BOOST_COMPUTE_FUNCTIONAL_AS_HPP
- #define BOOST_COMPUTE_FUNCTIONAL_AS_HPP
- namespace boost {
- namespace compute {
- namespace detail {
- template<class T, class Arg>
- struct invoked_as
- {
- invoked_as(const Arg &arg)
- : m_arg(arg)
- {
- }
- Arg m_arg;
- };
- }
- template<class T>
- struct as
- {
- typedef T result_type;
-
- template<class Arg>
- detail::invoked_as<T, Arg> operator()(const Arg &arg) const
- {
- return detail::invoked_as<T, Arg>(arg);
- }
- };
- }
- }
- #endif
|