Skip to content

Commit 6a47be0

Browse files
[NFC][SYCL] Clarify comments to TryToGet* type traits (#8510)
1 parent b10ce1c commit 6a47be0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sycl/include/sycl/detail/generic_type_traits.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,8 @@ struct convert_data_type_impl<T, B, enable_if_t<is_vgentype<T>::value, T>> {
299299
template <typename T, typename B>
300300
using convert_data_type = convert_data_type_impl<T, B, T>;
301301

302-
// Try to get pointer_t (legacy) or pointer, otherwise T
302+
// TryToGetPointerT<T>::type is T::pointer_t (legacy) or T::pointer if those
303+
// exist, otherwise T.
303304
template <typename T> class TryToGetPointerT {
304305
static T check(...);
305306
template <typename A> static typename A::pointer_t check(const A &);
@@ -311,7 +312,8 @@ template <typename T> class TryToGetPointerT {
311312
std::is_pointer<T>::value || !std::is_same<T, type>::value;
312313
};
313314

314-
// Try to get element_type or value_type, otherwise T
315+
// TryToGetElementType<T>::type is T::element_type or T::value_type if those
316+
// exist, otherwise T.
315317
template <typename T> class TryToGetElementType {
316318
static T check(...);
317319
template <typename A> static typename A::element_type check(const A &);
@@ -322,7 +324,7 @@ template <typename T> class TryToGetElementType {
322324
static constexpr bool value = !std::is_same<T, type>::value;
323325
};
324326

325-
// Try to get vector_t, otherwise T
327+
// TryToGetVectorT<T>::type is T::vector_t if that exists, otherwise T.
326328
template <typename T> class TryToGetVectorT {
327329
static T check(...);
328330
template <typename A> static typename A::vector_t check(const A &);

0 commit comments

Comments
 (0)