qvector.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //---------------------------------------------------------------------------//
  2. // Copyright (c) 2013-2014 Kyle Lutz <kyle.r.lutz@gmail.com>
  3. //
  4. // Distributed under the Boost Software License, Version 1.0
  5. // See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt
  7. //
  8. // See http://boostorg.github.com/compute for more information.
  9. //---------------------------------------------------------------------------//
  10. #ifndef BOOST_COMPUTE_INTEROP_QT_QVECTOR_HPP
  11. #define BOOST_COMPUTE_INTEROP_QT_QVECTOR_HPP
  12. #include <boost/compute/detail/is_contiguous_iterator.hpp>
  13. #include <QVector>
  14. namespace boost {
  15. namespace compute {
  16. namespace detail {
  17. template<class Iterator>
  18. struct _is_contiguous_iterator<
  19. Iterator,
  20. typename boost::enable_if<
  21. typename boost::is_same<
  22. Iterator,
  23. typename QVector<typename Iterator::value_type>::iterator
  24. >::type
  25. >::type
  26. > : public boost::true_type {};
  27. template<class Iterator>
  28. struct _is_contiguous_iterator<
  29. Iterator,
  30. typename boost::enable_if<
  31. typename boost::is_same<
  32. Iterator,
  33. typename QVector<typename Iterator::value_type>::const_iterator
  34. >::type
  35. >::type
  36. > : public boost::true_type {};
  37. } // end detail namespace
  38. } // end compute namespace
  39. } // end boost namespace
  40. #endif // BOOST_COMPUTE_INTEROP_QT_QVECTOR_HPP