Fix type traits generator

This commit is contained in:
John Wellbelove 2023-03-28 17:43:00 +01:00
parent 363a3e2dab
commit 1aa963d469
3 changed files with 42 additions and 27 deletions

View File

@ -118,8 +118,8 @@ namespace etl
const T integral_constant<T, VALUE>::value;
#if ETL_USING_CPP17
template <typename T>
using integral_constant_v = std::integral_constant<T>::value;
template <typename T, T VALUE>
inline constexpr T integral_constant_v = std::integral_constant<T, VALUE>::value;
#endif
#if ETL_USING_CPP11
@ -130,6 +130,11 @@ namespace etl
struct bool_constant : etl::integral_constant<bool, B> { };
#endif
#if ETL_USING_CPP17
template <bool B>
inline constexpr bool bool_constant_v = std::bool_constant<B>::value;
#endif
//***************************************************************************
/// negation
template <typename T>
@ -816,20 +821,25 @@ namespace etl
#else // Condition = ETL_USING_STL && ETL_USING_CPP11
//*****************************************************************************
// Traits are derived from the STL
//*****************************************************************************
//*****************************************************************************
// Traits are derived from the STL
//*****************************************************************************
//***************************************************************************
/// integral_constant
///\ingroup type_traits
template <typename T, const T VALUE>
struct integral_constant : std::integral_constant<T, VALUE> {};
//***************************************************************************
/// integral_constant
///\ingroup type_traits
template <typename T, T VALUE>
struct integral_constant : std::integral_constant<T, VALUE> {};
/// integral_constant specialisations
///\ingroup type_traits
typedef integral_constant<bool, false> false_type;
typedef integral_constant<bool, true> true_type;
/// integral_constant specialisations
///\ingroup type_traits
typedef integral_constant<bool, false> false_type;
typedef integral_constant<bool, true> true_type;
#if ETL_USING_CPP17
template <typename T, T VALUE>
inline constexpr T integral_constant_v = std::integral_constant<T, VALUE>::value;
#endif
#if ETL_USING_CPP17
template <bool B>
@ -839,6 +849,11 @@ namespace etl
struct bool_constant : std::integral_constant<bool, B> { };
#endif
#if ETL_USING_CPP17
template <bool B>
inline constexpr bool bool_constant_v = std::bool_constant<B>::value;
#endif
//***************************************************************************
/// negation
///\ingroup type_traits

View File

@ -809,20 +809,20 @@ namespace etl
#else // Condition = ETL_USING_STL && ETL_USING_CPP11
//*****************************************************************************
// Traits are derived from the STL
//*****************************************************************************
//*****************************************************************************
// Traits are derived from the STL
//*****************************************************************************
//***************************************************************************
/// integral_constant
///\ingroup type_traits
template <typename T, T VALUE>
struct integral_constant : std::integral_constant<T, VALUE> {};
//***************************************************************************
/// integral_constant
///\ingroup type_traits
template <typename T, T VALUE>
struct integral_constant : std::integral_constant<T, VALUE> {};
/// integral_constant specialisations
///\ingroup type_traits
typedef integral_constant<bool, false> false_type;
typedef integral_constant<bool, true> true_type;
/// integral_constant specialisations
///\ingroup type_traits
typedef integral_constant<bool, false> false_type;
typedef integral_constant<bool, true> true_type;
#if ETL_USING_CPP17
template <typename T, T VALUE>

View File

@ -1 +1 @@
20.35.14
20.35.15