]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/compute/include/boost/compute/type_traits/is_device_iterator.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / compute / include / boost / compute / type_traits / is_device_iterator.hpp
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
11 #ifndef BOOST_COMPUTE_TYPE_TRAITS_IS_DEVICE_ITERATOR_HPP
12 #define BOOST_COMPUTE_TYPE_TRAITS_IS_DEVICE_ITERATOR_HPP
13
14 #include <boost/type_traits/integral_constant.hpp>
15
16 namespace boost {
17 namespace compute {
18
19 /// Meta-function returning \c true if \c Iterator is a device-iterator.
20 ///
21 /// By default, this function returns false. Device iterator types (such as
22 /// buffer_iterator) should specialize this trait and return \c true.
23 ///
24 /// For example:
25 /// \code
26 /// is_device_iterator<buffer_iterator<int>>::value == true
27 /// is_device_iterator<std::vector<int>::iterator>::value == false
28 /// \endcode
29 template<class Iterator>
30 struct is_device_iterator : boost::false_type {};
31
32 /// \internal_
33 template<class Iterator>
34 struct is_device_iterator<const Iterator> : is_device_iterator<Iterator> {};
35
36 } // end compute namespace
37 } // end boost namespace
38
39 #endif // BOOST_COMPUTE_TYPE_TRAITS_IS_DEVICE_ITERATOR_HPP