diff options
Diffstat (limited to 'boost/compute/algorithm/minmax_element.hpp')
-rw-r--r-- | boost/compute/algorithm/minmax_element.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/boost/compute/algorithm/minmax_element.hpp b/boost/compute/algorithm/minmax_element.hpp index 4b2aae6dee..ab1614f3fa 100644 --- a/boost/compute/algorithm/minmax_element.hpp +++ b/boost/compute/algorithm/minmax_element.hpp @@ -13,10 +13,13 @@ #include <utility> +#include <boost/static_assert.hpp> + #include <boost/compute/system.hpp> #include <boost/compute/command_queue.hpp> #include <boost/compute/algorithm/max_element.hpp> #include <boost/compute/algorithm/min_element.hpp> +#include <boost/compute/type_traits/is_device_iterator.hpp> namespace boost { namespace compute { @@ -42,6 +45,7 @@ minmax_element(InputIterator first, Compare compare, command_queue &queue = system::default_queue()) { + BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value); if(first == last){ // empty range return std::make_pair(first, first); @@ -58,6 +62,7 @@ minmax_element(InputIterator first, InputIterator last, command_queue &queue = system::default_queue()) { + BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value); if(first == last){ // empty range return std::make_pair(first, first); |