]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/compute/algorithm/replace_copy.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / compute / algorithm / replace_copy.hpp
index 34f61b514fddfcd21eef6b133bfbfd1cf663650a..3979ff295a73a514fe227f29bab44661a84ac3b8 100644 (file)
 
 #include <iterator>
 
+#include <boost/static_assert.hpp>
+
 #include <boost/compute/system.hpp>
 #include <boost/compute/command_queue.hpp>
 #include <boost/compute/algorithm/copy.hpp>
 #include <boost/compute/algorithm/replace.hpp>
+#include <boost/compute/type_traits/is_device_iterator.hpp>
 
 namespace boost {
 namespace compute {
@@ -37,6 +40,9 @@ replace_copy(InputIterator first,
              const T &new_value,
              command_queue &queue = system::default_queue())
 {
+    BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
+    BOOST_STATIC_ASSERT(is_device_iterator<OutputIterator>::value);
+
     typedef typename std::iterator_traits<OutputIterator>::difference_type difference_type;
 
     difference_type count = std::distance(first, last);