Skip to content

Commit 6af8716

Browse files
[SYCLomatic] Fix for device_iterator trivial copyable (and device copyable) (#2850)
* fix for device_iterator trivial copyable (and device copyable) Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com> * restore existing explicit template arg copy constructor Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com> --------- Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
1 parent c8bd1b8 commit 6af8716

File tree

1 file changed

+2
-5
lines changed
  • clang/runtime/dpct-rt/include/dpct/dpl_extras

1 file changed

+2
-5
lines changed

clang/runtime/dpct-rt/include/dpct/dpl_extras/memory.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -574,11 +574,8 @@ template <typename T> class device_iterator : public device_pointer<T> {
574574
template <sycl::access_mode inMode>
575575
device_iterator(const device_iterator<T> &in)
576576
: Base(in.ptr), idx(in.idx) {} // required for iter_mode
577-
device_iterator &operator=(const device_iterator &in) {
578-
Base::operator=(in);
579-
idx = in.idx;
580-
return *this;
581-
}
577+
device_iterator(const device_iterator &in) = default;
578+
device_iterator &operator=(const device_iterator &in) = default;
582579

583580
reference operator*() const { return *(Base::ptr + idx); }
584581

0 commit comments

Comments
 (0)