diff --git a/include/podio/UserDataCollection.h b/include/podio/UserDataCollection.h index 2d356a938..87f9dc433 100644 --- a/include/podio/UserDataCollection.h +++ b/include/podio/UserDataCollection.h @@ -32,13 +32,19 @@ using SupportedUserDataTypes = std::tuple; /** - * Alias template to be used to enable template specializations only for the - * types listed in the SupportedUserDataTypes list or if they are components - * that were generated by podio + * Static bool for determining whether a type T is a supported user data type. + * Effectively boils down to being listed in SupportedUserDataTypes or being a + * component of an EDM generated by podio. */ template -using EnableIfSupportedUserType = - std::enable_if_t || detail::isComponent>; +constexpr static bool isSupportedUserDataType = detail::isInTuple || detail::isComponent; + +/** + * Alias template to be used to enable template specializations only for types + * that are actually supported user data types + */ +template +using EnableIfSupportedUserType = std::enable_if_t>; /** helper template to provide readable type names for basic types with macro PODIO_ADD_USER_TYPE(type) */