summaryrefslogtreecommitdiff
path: root/boost/compute/algorithm/any_of.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/compute/algorithm/any_of.hpp')
-rw-r--r--boost/compute/algorithm/any_of.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/boost/compute/algorithm/any_of.hpp b/boost/compute/algorithm/any_of.hpp
index 54031fbac5..e3c52daee3 100644
--- a/boost/compute/algorithm/any_of.hpp
+++ b/boost/compute/algorithm/any_of.hpp
@@ -11,8 +11,11 @@
#ifndef BOOST_COMPUTE_ALGORITHM_ANY_OF_HPP
#define BOOST_COMPUTE_ALGORITHM_ANY_OF_HPP
+#include <boost/static_assert.hpp>
+
#include <boost/compute/system.hpp>
#include <boost/compute/algorithm/find_if.hpp>
+#include <boost/compute/type_traits/is_device_iterator.hpp>
namespace boost {
namespace compute {
@@ -33,6 +36,7 @@ inline bool any_of(InputIterator first,
UnaryPredicate predicate,
command_queue &queue = system::default_queue())
{
+ BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
return ::boost::compute::find_if(first, last, predicate, queue) != last;
}