summaryrefslogtreecommitdiff
path: root/boost/compute/algorithm/partition.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/compute/algorithm/partition.hpp')
-rw-r--r--boost/compute/algorithm/partition.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/boost/compute/algorithm/partition.hpp b/boost/compute/algorithm/partition.hpp
index 59d0c78f7e..f5a5429ac4 100644
--- a/boost/compute/algorithm/partition.hpp
+++ b/boost/compute/algorithm/partition.hpp
@@ -11,9 +11,12 @@
#ifndef BOOST_COMPUTE_ALGORITHM_PARTITION_HPP
#define BOOST_COMPUTE_ALGORITHM_PARTITION_HPP
+#include <boost/static_assert.hpp>
+
#include <boost/compute/system.hpp>
#include <boost/compute/command_queue.hpp>
#include <boost/compute/algorithm/stable_partition.hpp>
+#include <boost/compute/type_traits/is_device_iterator.hpp>
namespace boost {
namespace compute {
@@ -32,6 +35,7 @@ inline Iterator partition(Iterator first,
UnaryPredicate predicate,
command_queue &queue = system::default_queue())
{
+ BOOST_STATIC_ASSERT(is_device_iterator<Iterator>::value);
return stable_partition(first, last, predicate, queue);
}