Skip to content

Commit eac1990

Browse files
committed
Also apply change to operator=
Signed-off-by: James Brodman <[email protected]>
1 parent 1aaf075 commit eac1990

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sycl/include/CL/sycl/multi_ptr.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,21 @@ template <typename ElementType, access::address_space Space> class multi_ptr {
5959
// Assignment and access operators
6060
multi_ptr &operator=(const multi_ptr &) = default;
6161
multi_ptr &operator=(multi_ptr &&) = default;
62+
63+
#ifdef __SYCL_DEVICE_ONLY__
6264
multi_ptr &operator=(pointer_t pointer) {
6365
m_Pointer = pointer;
6466
return *this;
6567
}
66-
#ifdef __SYCL_DEVICE_ONLY__
68+
#endif
69+
6770
multi_ptr &operator=(ElementType *pointer) {
6871
// TODO An implementation should reject an argument if the deduced
6972
// address space is not compatible with Space.
7073
m_Pointer = (pointer_t)pointer;
7174
return *this;
7275
}
73-
#endif
76+
7477
multi_ptr &operator=(std::nullptr_t) {
7578
m_Pointer = nullptr;
7679
return *this;

0 commit comments

Comments
 (0)