1 //---------------------------------------------------------------------------//
2 // Copyright (c) 2013-2014 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_TYPE_TRAITS_RESULT_OF_HPP
12 #define BOOST_COMPUTE_TYPE_TRAITS_RESULT_OF_HPP
14 #include <boost/utility/result_of.hpp>
19 /// Returns the result of \c Function when called with \c Args.
23 /// // int + int = int
24 /// result_of<plus(int, int)>::type == int
26 template<class Signature>
29 // the default implementation uses the TR1-style result_of protocol. note
30 // that we explicitly do *not* use the C++11 decltype operator as we want
31 // the result type as it would be on an OpenCL device, not the actual C++
32 // type resulting from "invoking" the function on the host.
33 typedef typename ::boost::tr1_result_of<Signature>::type type;
36 } // end compute namespace
37 } // end boost namespace
39 #endif // BOOST_COMPUTE_TYPE_TRAITS_RESULT_OF_HPP