#include <type_traits>
Go to the source code of this file.
|
| template<typename T , typename... Base> |
| using | tvm::internal::enable_for_t = std::enable_if_t<(...||(std::is_same_v< T, Base >||derives_from< T, Base >())), int > |
| |
| template<typename T , template< typename... > class... Base> |
| using | tvm::internal::enable_for_templated_t = std::enable_if_t<(...||derives_from< T, Base >()), int > |
| |
| template<typename T , template< typename... > class... Base> |
| using | tvm::internal::disable_for_templated_t = std::enable_if_t<!(...||derives_from< T, Base >()), int > |
| |
| template<typename T , bool c> |
| using | tvm::internal::const_if = std::conditional< c, const T, T > |
| |
| template<typename T , bool c> |
| using | tvm::internal::const_if_t = typename const_if< T, c >::type |
| |
◆ TVM_CREATE_HAS_MEMBER_TYPE_TRAIT_FOR
| #define TVM_CREATE_HAS_MEMBER_TYPE_TRAIT_FOR |
( |
|
Type | ) |
|
Value:
{ \
struct has_type_##
Type##_helper \
{ \
template<typename T> \
std::false_type has(...); \
\
template<typename T> \
std::true_type has(
typename T::Type *); \
}; \
\
template<typename T> \
using has_public_member_type_##
Type = decltype(has_type_##
Type##_helper{}.has<T>(
nullptr)); \
}
Type
Definition: enums.h:15
Definition: CallbackManager.h:12
Copyright 2017-2020 CNRS-AIST JRL and CNRS-UM LIRMM For a name XXX, this creates a templated struct has_public_member_type_XXX in the namespace tvm::internal such that has_public_member_type_XXX<T>::value is true if T::XXX is a public, valid expression and refers to a type, and false otherwise.