summaryrefslogtreecommitdiff
path: root/boost/compute/algorithm/find.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/compute/algorithm/find.hpp')
-rw-r--r--boost/compute/algorithm/find.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/boost/compute/algorithm/find.hpp b/boost/compute/algorithm/find.hpp
index a6225b8c99..338b5af0c3 100644
--- a/boost/compute/algorithm/find.hpp
+++ b/boost/compute/algorithm/find.hpp
@@ -11,11 +11,14 @@
#ifndef BOOST_COMPUTE_ALGORITHM_FIND_HPP
#define BOOST_COMPUTE_ALGORITHM_FIND_HPP
+#include <boost/static_assert.hpp>
+
#include <boost/compute/lambda.hpp>
#include <boost/compute/system.hpp>
#include <boost/compute/command_queue.hpp>
#include <boost/compute/algorithm/find_if.hpp>
#include <boost/compute/type_traits/vector_size.hpp>
+#include <boost/compute/type_traits/is_device_iterator.hpp>
namespace boost {
namespace compute {
@@ -30,6 +33,7 @@ inline InputIterator find(InputIterator first,
const T &value,
command_queue &queue = system::default_queue())
{
+ BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
typedef typename std::iterator_traits<InputIterator>::value_type value_type;
using ::boost::compute::_1;