mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-09 14:49:53 +08:00
Minor tweak to conditional_integral_constant
This commit is contained in:
parent
e3c6865bd1
commit
636554812f
@ -54,6 +54,7 @@ SOFTWARE.
|
||||
#define __ETL_TYPE_TRAITS__
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "platform.h"
|
||||
#include "nullptr.h"
|
||||
@ -334,7 +335,7 @@ namespace etl
|
||||
struct conditional_integral_constant<false, T, TRUE_VALUE, FALSE_VALUE>
|
||||
{
|
||||
STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
|
||||
static const T value = FALSE_VALUE;
|
||||
static const T value = FALSE_VALUE;
|
||||
};
|
||||
|
||||
/// make_signed
|
||||
@ -484,14 +485,14 @@ namespace etl
|
||||
///\ingroup types
|
||||
//***************************************************************************
|
||||
template <typename T,
|
||||
typename T1, typename T2 = void, typename T3 = void, typename T4 = void,
|
||||
typename T5 = void, typename T6 = void, typename T7 = void, typename T8 = void,
|
||||
typename T9 = void, typename T10 = void, typename T11 = void, typename T12 = void,
|
||||
typename T13 = void, typename T14 = void, typename T15 = void, typename T16 = void,
|
||||
typename T1, typename T2 = void, typename T3 = void, typename T4 = void,
|
||||
typename T5 = void, typename T6 = void, typename T7 = void, typename T8 = void,
|
||||
typename T9 = void, typename T10 = void, typename T11 = void, typename T12 = void,
|
||||
typename T13 = void, typename T14 = void, typename T15 = void, typename T16 = void,
|
||||
typename T17 = void>
|
||||
struct is_one_of
|
||||
{
|
||||
static const bool value =
|
||||
static const bool value =
|
||||
etl::is_same<T, T1>::value ||
|
||||
etl::is_same<T, T2>::value ||
|
||||
etl::is_same<T, T3>::value ||
|
||||
|
||||
@ -66,6 +66,7 @@ cog.outl("//********************************************************************
|
||||
#define __ETL_TYPE_TRAITS__
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "platform.h"
|
||||
#include "nullptr.h"
|
||||
@ -333,7 +334,10 @@ namespace etl
|
||||
/// conditional_integral_constant
|
||||
///\ingroup type_traits
|
||||
template <bool B, typename T, T TRUE_VALUE, T FALSE_VALUE>
|
||||
struct conditional_integral_constant
|
||||
struct conditional_integral_constant;
|
||||
|
||||
template <typename T, T TRUE_VALUE, T FALSE_VALUE>
|
||||
struct conditional_integral_constant<true, T, TRUE_VALUE, FALSE_VALUE>
|
||||
{
|
||||
STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
|
||||
static const T value = TRUE_VALUE;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user