Skip to content

Commit e531b05

Browse files
committed
Make default constructor private
1 parent 172d717 commit e531b05

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

sycl/include/sycl/ext/oneapi/experimental/work_group_memory.hpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,14 @@ class __SYCL_SPECIAL_CLASS __SYCL_TYPE(work_group_memory) work_group_memory
4949
using decoratedPtr = typename sycl::detail::DecoratedType<
5050
value_type, access::address_space::local_space>::type *;
5151

52-
// Frontend requires special types to have a default constructor in device
53-
// compilation mode in order to have a uniform way of initializing an object of
54-
// special type to then call the __init method on it. This is purely an
55-
// implementation detail and not part of the spec.
56-
#ifdef __SYCL_DEVICE_ONLY__
52+
// Frontend requires special types to have a default constructor in order to
53+
// have a uniform way of initializing an object of special type to then call
54+
// the __init method on it. This is purely an implementation detail and not
55+
// part of the spec.
5756
work_group_memory() = default;
58-
#endif
5957

6058
public:
61-
work_group_memory(const indeterminate_t &) {};
59+
work_group_memory(const indeterminate_t &){};
6260
work_group_memory(const work_group_memory &rhs) = default;
6361
work_group_memory &operator=(const work_group_memory &rhs) = default;
6462
template <typename T = DataT,

0 commit comments

Comments
 (0)