1 //---------------------------------------------------------------------------//
2 // Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
4 // Distributed under the Boost Software License, Version 1.0
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt
8 // See http://boostorg.github.com/compute for more information.
9 //---------------------------------------------------------------------------//
11 #ifndef BOOST_COMPUTE_FUNCTIONAL_CONVERT_HPP
12 #define BOOST_COMPUTE_FUNCTIONAL_CONVERT_HPP
18 template<class T, class Arg>
19 struct invoked_convert
21 invoked_convert(const Arg &arg)
29 } // end detail namespace
31 /// The \ref convert function converts its argument to type \c T (similar to
34 /// \see \ref as "as<T>"
38 typedef T result_type;
42 detail::invoked_convert<T, Arg> operator()(const Arg &arg) const
44 return detail::invoked_convert<T, Arg>(arg);
48 } // end compute namespace
49 } // end boost namespace
51 #endif // BOOST_COMPUTE_FUNCTIONAL_CONVERT_HPP