@@ -181,6 +181,7 @@ template <typename... property_tys>
181
181
class __SYCL_EBO properties<
182
182
detail::properties_type_list<property_tys...>,
183
183
std::enable_if_t <!detail::property_names_are_unique<property_tys...>>> {
184
+ static_assert ((is_property_v<property_tys> && ...));
184
185
185
186
// This is a separate specialization to report an error, we can afford doing
186
187
// extra work to provide nice error message without sacrificing compile time
@@ -206,10 +207,14 @@ class __SYCL_EBO properties<
206
207
static_assert ((is_property_v<property_tys> && ...));
207
208
};
208
209
210
+ // NOTE: Meta-function to implement CTAD rules isn't allowed to return
211
+ // `properties<something>` and it's impossible to return a pack as well. As
212
+ // such, we're forced to have an extra level of `detail::properties_type_list`
213
+ // for the purpose of providing CTAD rules.
209
214
template <typename ... property_tys>
210
- class __SYCL_EBO
211
- properties< detail::properties_type_list<property_tys...>,
212
- std::enable_if_t <detail::properties_are_sorted <property_tys...>>>
215
+ class __SYCL_EBO properties<
216
+ detail::properties_type_list<property_tys...>,
217
+ std::enable_if_t <detail::property_names_are_unique <property_tys...>>>
213
218
: public property_tys... {
214
219
static_assert ((is_property_v<property_tys> && ...));
215
220
static_assert (
@@ -253,7 +258,7 @@ class __SYCL_EBO
253
258
// static constexpr auto get_property() requires(is_empty_v<ret_t>) {
254
259
// return ret_t{};
255
260
// }
256
- // constexpr auto get_property() requires(!is_empty_v<ret_t>) {
261
+ // constexpr auto get_property() const requires(!is_empty_v<ret_t>) {
257
262
// return get_property(key_tag<property_key_t>{});
258
263
// }
259
264
template <typename property_key_t >
@@ -275,6 +280,8 @@ class __SYCL_EBO
275
280
return get_property (detail::property_key_tag<property_key_t >{});
276
281
}
277
282
283
+ // TODO: Do we need separate `static` overload if we decide to keep this
284
+ // interface?
278
285
template <typename property_key_t , typename default_property_t >
279
286
constexpr auto
280
287
get_property_or_default_to (default_property_t default_property) {
@@ -305,7 +312,7 @@ properties(properties<detail::properties_type_list<other_property_list_tys...>>,
305
312
306
313
using empty_properties_t = decltype (properties{});
307
314
308
- template <typename , typename > struct is_property_key_of : std::false_type {};
315
+ template <typename , typename > struct is_property_of : std::false_type {};
309
316
} // namespace new_properties
310
317
} // namespace ext::oneapi::experimental
311
318
} // namespace _V1
0 commit comments