Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions sycl/include/sycl/detail/generic_type_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@ struct convert_data_type_impl<T, B, enable_if_t<is_vgentype<T>::value, T>> {
template <typename T, typename B>
using convert_data_type = convert_data_type_impl<T, B, T>;

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

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

// Try to get vector_t, otherwise T
// TryToGetVectorT<T>::type is T::vector_t if that exists, otherwise T.
template <typename T> class TryToGetVectorT {
static T check(...);
template <typename A> static typename A::vector_t check(const A &);
Expand Down