File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
sycl/include/CL/sycl/detail Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -90,20 +90,21 @@ template <typename AllocatorT> class buffer_impl : public SYCLMemObjT {
90
90
set_final_data (weak_ptr_class<T>(HostData));
91
91
}
92
92
93
- template <typename Iterator> struct is_const_iterator {
94
- using pointer = typename std::iterator_traits<Iterator>::pointer;
95
- static constexpr bool value =
96
- std::is_const<typename std::remove_pointer<pointer>::type>::value;
97
- };
93
+ template <typename Iterator>
94
+ using GetTypeFromIterator = typename std::remove_pointer<
95
+ typename std::iterator_traits<Iterator>::pointer>;
96
+
97
+ template <typename Iterator>
98
+ using IsConstIterator =
99
+ typename std::is_const<typename GetTypeFromIterator<Iterator>::type>;
98
100
99
101
template <typename Iterator>
100
102
using EnableIfConstIterator =
101
- typename std::enable_if<is_const_iterator<Iterator>::value,
102
- Iterator>::type;
103
+ typename std::enable_if<IsConstIterator<Iterator>::value, Iterator>::type;
103
104
104
105
template <typename Iterator>
105
106
using EnableIfNotConstIterator =
106
- typename std::enable_if<!is_const_iterator <Iterator>::value,
107
+ typename std::enable_if<!IsConstIterator <Iterator>::value,
107
108
Iterator>::type;
108
109
109
110
template <class InputIterator >
You can’t perform that action at this time.
0 commit comments