Skip to content

Commit 3fdeabd

Browse files
author
Chen, Brox
committed
added template deduction guide to annotated_arg/ptr spec
1 parent b19f43d commit 3fdeabd

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

sycl/doc/extensions/proposed/sycl_ext_oneapi_annotated_arg.asciidoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,15 @@ class annotated_arg {
225225
template<typename propertyT>
226226
static constexpr /*unspecified*/ get_property();
227227
};
228+
229+
//Deduction guides
230+
template <typename T, typename... Args>
231+
annotated_arg(T, Args... args) -> annotated_arg<T, detail::properties_t<Args...>>;
232+
233+
template <typename T, typename oldProp, typename otherProp>
234+
annotated_arg(annotated_arg<T, oldProp>, otherProp other)
235+
-> annotated_arg<T, detail::merged_properties_t<oldProp, otherProp>>;
236+
228237
} // namespace sycl::ext::oneapi::experimental
229238
----
230239

sycl/doc/extensions/proposed/sycl_ext_oneapi_annotated_ptr.asciidoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,15 @@ class annotated_ptr {
304304
template<typename propertyT>
305305
static constexpr /*unspecified*/ get_property();
306306
};
307+
308+
//Deduction guides
309+
template <typename T, typename... Args>
310+
annotated_ptr(T, Args... args) -> annotated_ptr<T, detail::properties_t<Args...>>;
311+
312+
template <typename T, typename oldProp, typename otherProp>
313+
annotated_ptr(annotated_arg<T, oldProp>, otherProp other)
314+
-> annotated_ptr<T, detail::merged_properties_t<oldProp, otherProp>>;
315+
307316
} // namespace sycl::ext::oneapi::experimental
308317
----
309318

0 commit comments

Comments
 (0)