Merge branch 'hotfix/change-static-const-to-static-etl-constant' into development

This commit is contained in:
John Wellbelove 2021-03-25 17:12:33 +00:00
commit 640704cf6b
43 changed files with 158 additions and 158 deletions

View File

@ -45,12 +45,12 @@ namespace etl
typedef std::memory_order memory_order;
static const etl::memory_order memory_order_relaxed = std::memory_order_relaxed;
static const etl::memory_order memory_order_consume = std::memory_order_consume;
static const etl::memory_order memory_order_acquire = std::memory_order_acquire;
static const etl::memory_order memory_order_release = std::memory_order_release;
static const etl::memory_order memory_order_acq_rel = std::memory_order_acq_rel;
static const etl::memory_order memory_order_seq_cst = std::memory_order_seq_cst;
static ETL_CONSTANT etl::memory_order memory_order_relaxed = std::memory_order_relaxed;
static ETL_CONSTANT etl::memory_order memory_order_consume = std::memory_order_consume;
static ETL_CONSTANT etl::memory_order memory_order_acquire = std::memory_order_acquire;
static ETL_CONSTANT etl::memory_order memory_order_release = std::memory_order_release;
static ETL_CONSTANT etl::memory_order memory_order_acq_rel = std::memory_order_acq_rel;
static ETL_CONSTANT etl::memory_order memory_order_seq_cst = std::memory_order_seq_cst;
template <typename T>
class atomic

View File

@ -297,8 +297,8 @@ namespace etl
{
}
static const uint_least8_t IS_TRUNCATED = etl::bit<0>::value;
static const uint_least8_t CLEAR_AFTER_USE = etl::bit<1>::value;
static ETL_CONSTANT uint_least8_t IS_TRUNCATED = etl::bit<0>::value;
static ETL_CONSTANT uint_least8_t CLEAR_AFTER_USE = etl::bit<1>::value;
size_type current_size; ///< The current number of elements in the string.
const size_type CAPACITY; ///< The maximum number of elements in the string.

View File

@ -85,7 +85,7 @@ namespace etl
struct max_value_for_nbits
{
typedef typename etl::smallest_uint_for_bits<NBITS>::type value_type;
static const value_type value = (value_type(1) << (NBITS - 1)) | max_value_for_nbits<NBITS - 1>::value;
static ETL_CONSTANT value_type value = (value_type(1) << (NBITS - 1)) | max_value_for_nbits<NBITS - 1>::value;
};
/// Specialisation for when NBITS == 0.
@ -93,7 +93,7 @@ namespace etl
struct max_value_for_nbits<0>
{
typedef etl::smallest_uint_for_bits<0>::type value_type;
static const value_type value = 0;
static ETL_CONSTANT value_type value = 0;
};
template <const size_t NBITS>
@ -357,7 +357,7 @@ namespace etl
struct bit
{
typedef typename etl::smallest_uint_for_bits<POSITION + 1>::type value_type;
static const value_type value = value_type(1) << POSITION;
static ETL_CONSTANT value_type value = value_type(1) << POSITION;
};
template <const size_t POSITION>

View File

@ -137,10 +137,10 @@ namespace etl
public:
static const element_t ALL_SET = etl::integral_limits<element_t>::max;
static const element_t ALL_CLEAR = 0;
static ETL_CONSTANT element_t ALL_SET = etl::integral_limits<element_t>::max;
static ETL_CONSTANT element_t ALL_CLEAR = 0;
static const size_t BITS_PER_ELEMENT = etl::integral_limits<element_t>::bits;
static ETL_CONSTANT size_t BITS_PER_ELEMENT = etl::integral_limits<element_t>::bits;
#if ETL_CPP11_SUPPORTED
typedef etl::span<element_t> span_type;
@ -894,11 +894,11 @@ namespace etl
class bitset : public etl::ibitset
{
static const size_t ARRAY_SIZE = (MAXN % BITS_PER_ELEMENT == 0) ? MAXN / BITS_PER_ELEMENT : MAXN / BITS_PER_ELEMENT + 1;
static ETL_CONSTANT size_t ARRAY_SIZE = (MAXN % BITS_PER_ELEMENT == 0) ? MAXN / BITS_PER_ELEMENT : MAXN / BITS_PER_ELEMENT + 1;
public:
static const size_t ALLOCATED_BITS = ARRAY_SIZE * BITS_PER_ELEMENT;
static ETL_CONSTANT size_t ALLOCATED_BITS = ARRAY_SIZE * BITS_PER_ELEMENT;
public:

View File

@ -47,7 +47,7 @@ namespace etl
typedef T value_type;
static const T value = VALUE;
static ETL_CONSTANT T value = VALUE;
};
template <typename T, const T VALUE>

View File

@ -114,16 +114,16 @@ namespace etl
typedef typename etl::conditional<etl::is_signed<T>::value, int32_t, uint32_t>::type scale_t;
typedef typename etl::conditional<etl::is_signed<T>::value, int32_t, uint32_t>::type sample_t;
static const sample_t SAMPLES = static_cast<sample_t>(SAMPLE_SIZE_);
static const scale_t SCALE = static_cast<scale_t>(SCALING_);
static ETL_CONSTANT sample_t SAMPLES = static_cast<sample_t>(SAMPLE_SIZE_);
static ETL_CONSTANT scale_t SCALE = static_cast<scale_t>(SCALING_);
public:
typedef T value_type;
typedef private_cumulative_moving_average::add_insert_iterator<this_t> add_insert_iterator;
static const size_t SAMPLE_SIZE = SAMPLE_SIZE_; ///< The number of samples averaged over.
static const size_t SCALING = SCALING_; ///< The sample scaling factor.
static ETL_CONSTANT size_t SAMPLE_SIZE = SAMPLE_SIZE_; ///< The number of samples averaged over.
static ETL_CONSTANT size_t SCALING = SCALING_; ///< The sample scaling factor.
//*************************************************************************
/// Constructor
@ -191,14 +191,14 @@ namespace etl
typedef typename etl::conditional<etl::is_signed<T>::value, int32_t, uint32_t>::type scale_t;
typedef typename etl::conditional<etl::is_signed<T>::value, int32_t, uint32_t>::type sample_t;
static const scale_t SCALE = static_cast<scale_t>(SCALING_);
static ETL_CONSTANT scale_t SCALE = static_cast<scale_t>(SCALING_);
public:
typedef T value_type;
typedef private_cumulative_moving_average::add_insert_iterator<this_t> add_insert_iterator;
static const size_t SCALING = SCALING_; ///< The sample scaling factor.
static ETL_CONSTANT size_t SCALING = SCALING_; ///< The sample scaling factor.
//*************************************************************************
/// Constructor
@ -279,7 +279,7 @@ namespace etl
typedef T value_type;
typedef private_cumulative_moving_average::add_insert_iterator<this_t> add_insert_iterator;
static const size_t SAMPLE_SIZE = SAMPLE_SIZE_;
static ETL_CONSTANT size_t SAMPLE_SIZE = SAMPLE_SIZE_;
//*************************************************************************
/// Constructor

View File

@ -63,7 +63,7 @@ namespace etl
static ETL_CONSTANT value_type ALL_SET = etl::integral_limits<value_type>::max & MASK;
static ETL_CONSTANT value_type ALL_CLEAR = 0;
static const size_t NBITS = etl::integral_limits<value_type>::bits;
static ETL_CONSTANT size_t NBITS = etl::integral_limits<value_type>::bits;
//*************************************************************************
/// Constructor

View File

@ -897,7 +897,7 @@ namespace etl
{
public:
static const size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
//*************************************************************************
/// Constructor.

View File

@ -800,7 +800,7 @@ namespace etl
{
public:
static const size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
//*************************************************************************
/// Constructor.

View File

@ -752,7 +752,7 @@ namespace etl
{
public:
static const size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
//*************************************************************************
/// Constructor.

View File

@ -837,7 +837,7 @@ namespace etl
{
public:
static const size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
//*************************************************************************
/// Constructor.

View File

@ -75,8 +75,8 @@ namespace etl
return hash;
}
static const uint64_t OFFSET_BASIS = 0xCBF29CE484222325ull;
static const uint64_t PRIME = 0x00000100000001b3ull;
static ETL_CONSTANT uint64_t OFFSET_BASIS = 0xCBF29CE484222325ull;
static ETL_CONSTANT uint64_t PRIME = 0x00000100000001b3ull;
};
//***************************************************************************
@ -133,8 +133,8 @@ namespace etl
return hash;
}
static const uint64_t OFFSET_BASIS = 0xCBF29CE484222325ull;
static const uint64_t PRIME = 0x00000100000001b3ull;
static ETL_CONSTANT uint64_t OFFSET_BASIS = 0xCBF29CE484222325ull;
static ETL_CONSTANT uint64_t PRIME = 0x00000100000001b3ull;
};
//***************************************************************************
@ -192,8 +192,8 @@ namespace etl
return hash;
}
static const uint32_t OFFSET_BASIS = 0x811C9DC5;
static const uint32_t PRIME = 0x01000193;
static ETL_CONSTANT uint32_t OFFSET_BASIS = 0x811C9DC5;
static ETL_CONSTANT uint32_t PRIME = 0x01000193;
};
//***************************************************************************
@ -250,8 +250,8 @@ namespace etl
return hash;
}
static const uint32_t OFFSET_BASIS = 0x811C9DC5;
static const uint32_t PRIME = 0x01000193;
static ETL_CONSTANT uint32_t OFFSET_BASIS = 0x811C9DC5;
static ETL_CONSTANT uint32_t PRIME = 0x01000193;
};
//***************************************************************************

View File

@ -1621,7 +1621,7 @@ namespace etl
ETL_STATIC_ASSERT((MAX_SIZE_ > 0U), "Zero capacity etl::forward_list is not valid");
static const size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
public:

View File

@ -320,9 +320,9 @@ namespace etl
private:
// Determines the index of the best unsigned type for the required number of bits.
static const int TYPE_INDEX = ((NBITS > 8) ? 1 : 0) +
((NBITS > 16) ? 1 : 0) +
((NBITS > 32) ? 1 : 0);
static ETL_CONSTANT int TYPE_INDEX = ((NBITS > 8) ? 1 : 0) +
((NBITS > 16) ? 1 : 0) +
((NBITS > 32) ? 1 : 0);
public:
@ -346,9 +346,9 @@ namespace etl
private:
// Determines the index of the best unsigned type for the required number of bits.
static const int TYPE_INDEX = ((NBITS > 8) ? 1 : 0) +
((NBITS > 16) ? 1 : 0) +
((NBITS > 32) ? 1 : 0);
static ETL_CONSTANT int TYPE_INDEX = ((NBITS > 8) ? 1 : 0) +
((NBITS > 16) ? 1 : 0) +
((NBITS > 32) ? 1 : 0);
public:
@ -372,9 +372,9 @@ namespace etl
private:
// Determines the index of the best unsigned type for the required value.
static const int TYPE_INDEX = ((VALUE > UINT_LEAST8_MAX) ? 1 : 0) +
((VALUE > UINT16_MAX) ? 1 : 0) +
((VALUE > UINT32_MAX) ? 1 : 0);
static ETL_CONSTANT int TYPE_INDEX = ((VALUE > UINT_LEAST8_MAX) ? 1 : 0) +
((VALUE > UINT16_MAX) ? 1 : 0) +
((VALUE > UINT32_MAX) ? 1 : 0);
public:
@ -398,9 +398,9 @@ namespace etl
private:
// Determines the index of the best signed type for the required value.
static const int TYPE_INDEX = (((VALUE > intmax_t(INT_LEAST8_MAX)) || (VALUE < intmax_t(INT_LEAST8_MIN))) ? 1 : 0) +
(((VALUE > intmax_t(INT16_MAX)) || (VALUE < intmax_t(INT16_MIN))) ? 1 : 0) +
(((VALUE > intmax_t(INT32_MAX)) || (VALUE < intmax_t(INT32_MIN))) ? 1 : 0);
static ETL_CONSTANT int TYPE_INDEX = (((VALUE > intmax_t(INT_LEAST8_MAX)) || (VALUE < intmax_t(INT_LEAST8_MIN))) ? 1 : 0) +
(((VALUE > intmax_t(INT16_MAX)) || (VALUE < intmax_t(INT16_MIN))) ? 1 : 0) +
(((VALUE > intmax_t(INT32_MAX)) || (VALUE < intmax_t(INT32_MIN))) ? 1 : 0);
public:

View File

@ -187,7 +187,7 @@ namespace etl
///< The memory for the pool of objects.
typename etl::aligned_storage<sizeof(Element), etl::alignment_of<Element>::value>::type buffer[VSize];
static const uint32_t Element_Size = sizeof(Element);
static ETL_CONSTANT uint32_t Element_Size = sizeof(Element);
// Should not be copied.
generic_pool(const generic_pool&);

View File

@ -1294,7 +1294,7 @@ namespace etl
ETL_STATIC_ASSERT((MAX_SIZE_ > 0U), "Zero capacity etl::indirect_vector is not valid");
static const size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
//*************************************************************************
/// Constructor.

View File

@ -59,10 +59,10 @@ namespace etl
template <>
struct integral_limits<void>
{
static const int min = 0;
static const int max = 0;
static const int bits = 0;
static const bool is_signed = false;
static ETL_CONSTANT int min = 0;
static ETL_CONSTANT int max = 0;
static ETL_CONSTANT int bits = 0;
static ETL_CONSTANT bool is_signed = false;
};
//***************************************************************************
@ -71,10 +71,10 @@ namespace etl
template <>
struct integral_limits<signed char>
{
static const signed char min = SCHAR_MIN;
static const signed char max = SCHAR_MAX;
static const int bits = CHAR_BIT;
static const bool is_signed = etl::is_signed<signed char>::value;
static ETL_CONSTANT signed char min = SCHAR_MIN;
static ETL_CONSTANT signed char max = SCHAR_MAX;
static ETL_CONSTANT int bits = CHAR_BIT;
static ETL_CONSTANT bool is_signed = etl::is_signed<signed char>::value;
};
//***************************************************************************
@ -83,10 +83,10 @@ namespace etl
template <>
struct integral_limits<unsigned char>
{
static const unsigned char min = 0;
static const unsigned char max = UCHAR_MAX;
static const int bits = CHAR_BIT;
static const bool is_signed = etl::is_signed<unsigned char>::value;
static ETL_CONSTANT unsigned char min = 0;
static ETL_CONSTANT unsigned char max = UCHAR_MAX;
static ETL_CONSTANT int bits = CHAR_BIT;
static ETL_CONSTANT bool is_signed = etl::is_signed<unsigned char>::value;
};
//***************************************************************************
@ -95,10 +95,10 @@ namespace etl
template <>
struct integral_limits<char>
{
static const char min = (etl::is_signed<char>::value) ? SCHAR_MIN : 0;
static const char max = (etl::is_signed<char>::value) ? SCHAR_MAX : char(UCHAR_MAX);
static const int bits = CHAR_BIT;
static const bool is_signed = etl::is_signed<char>::value;
static ETL_CONSTANT char min = (etl::is_signed<char>::value) ? SCHAR_MIN : 0;
static ETL_CONSTANT char max = (etl::is_signed<char>::value) ? SCHAR_MAX : char(UCHAR_MAX);
static ETL_CONSTANT int bits = CHAR_BIT;
static ETL_CONSTANT bool is_signed = etl::is_signed<char>::value;
};
//***************************************************************************
@ -107,10 +107,10 @@ namespace etl
template <>
struct integral_limits<short>
{
static const short min = SHRT_MIN;
static const short max = SHRT_MAX;
static const int bits = CHAR_BIT * (sizeof(short) / sizeof(char));
static const bool is_signed = etl::is_signed<short>::value;
static ETL_CONSTANT short min = SHRT_MIN;
static ETL_CONSTANT short max = SHRT_MAX;
static ETL_CONSTANT int bits = CHAR_BIT * (sizeof(short) / sizeof(char));
static ETL_CONSTANT bool is_signed = etl::is_signed<short>::value;
};
//***************************************************************************
@ -119,10 +119,10 @@ namespace etl
template <>
struct integral_limits<unsigned short>
{
static const unsigned short min = 0;
static const unsigned short max = USHRT_MAX;
static const int bits = CHAR_BIT * (sizeof(unsigned short) / sizeof(char));
static const bool is_signed = etl::is_signed<unsigned short>::value;
static ETL_CONSTANT unsigned short min = 0;
static ETL_CONSTANT unsigned short max = USHRT_MAX;
static ETL_CONSTANT int bits = CHAR_BIT * (sizeof(unsigned short) / sizeof(char));
static ETL_CONSTANT bool is_signed = etl::is_signed<unsigned short>::value;
};
//***************************************************************************
@ -131,10 +131,10 @@ namespace etl
template <>
struct integral_limits<int>
{
static const int min = INT_MIN;
static const int max = INT_MAX;
static const int bits = CHAR_BIT * (sizeof(int) / sizeof(char));
static const bool is_signed = etl::is_signed<int>::value;
static ETL_CONSTANT int min = INT_MIN;
static ETL_CONSTANT int max = INT_MAX;
static ETL_CONSTANT int bits = CHAR_BIT * (sizeof(int) / sizeof(char));
static ETL_CONSTANT bool is_signed = etl::is_signed<int>::value;
};
//***************************************************************************
@ -143,10 +143,10 @@ namespace etl
template <>
struct integral_limits<unsigned int>
{
static const unsigned int min = 0;
static const unsigned int max = UINT_MAX;
static const int bits = CHAR_BIT * (sizeof(unsigned int) / sizeof(char));
static const bool is_signed = etl::is_signed<unsigned int>::value;
static ETL_CONSTANT unsigned int min = 0;
static ETL_CONSTANT unsigned int max = UINT_MAX;
static ETL_CONSTANT int bits = CHAR_BIT * (sizeof(unsigned int) / sizeof(char));
static ETL_CONSTANT bool is_signed = etl::is_signed<unsigned int>::value;
};
//***************************************************************************
@ -155,10 +155,10 @@ namespace etl
template <>
struct integral_limits<long>
{
static const long min = LONG_MIN;
static const long max = LONG_MAX;
static const int bits = CHAR_BIT * (sizeof(long) / sizeof(char));
static const bool is_signed = etl::is_signed<long>::value;
static ETL_CONSTANT long min = LONG_MIN;
static ETL_CONSTANT long max = LONG_MAX;
static ETL_CONSTANT int bits = CHAR_BIT * (sizeof(long) / sizeof(char));
static ETL_CONSTANT bool is_signed = etl::is_signed<long>::value;
};
//***************************************************************************
@ -167,10 +167,10 @@ namespace etl
template <>
struct integral_limits<unsigned long>
{
static const unsigned long min = 0;
static const unsigned long max = ULONG_MAX;
static const int bits = CHAR_BIT * (sizeof(unsigned long) / sizeof(char));
static const bool is_signed = etl::is_signed<unsigned long>::value;
static ETL_CONSTANT unsigned long min = 0;
static ETL_CONSTANT unsigned long max = ULONG_MAX;
static ETL_CONSTANT int bits = CHAR_BIT * (sizeof(unsigned long) / sizeof(char));
static ETL_CONSTANT bool is_signed = etl::is_signed<unsigned long>::value;
};
#ifndef LLONG_MAX
@ -191,10 +191,10 @@ namespace etl
template <>
struct integral_limits<long long>
{
static const long long min = LLONG_MIN;
static const long long max = LLONG_MAX;
static const int bits = CHAR_BIT * (sizeof(long long) / sizeof(char));
static const bool is_signed = etl::is_signed<long long>::value;
static ETL_CONSTANT long long min = LLONG_MIN;
static ETL_CONSTANT long long max = LLONG_MAX;
static ETL_CONSTANT int bits = CHAR_BIT * (sizeof(long long) / sizeof(char));
static ETL_CONSTANT bool is_signed = etl::is_signed<long long>::value;
};
//***************************************************************************
@ -203,10 +203,10 @@ namespace etl
template <>
struct integral_limits<unsigned long long>
{
static const unsigned long long min = 0;
static const unsigned long long max = ULLONG_MAX;
static const int bits = CHAR_BIT * (sizeof(unsigned long long) / sizeof(char));
static const bool is_signed = etl::is_signed<unsigned long long>::value;
static ETL_CONSTANT unsigned long long min = 0;
static ETL_CONSTANT unsigned long long max = ULLONG_MAX;
static ETL_CONSTANT int bits = CHAR_BIT * (sizeof(unsigned long long) / sizeof(char));
static ETL_CONSTANT bool is_signed = etl::is_signed<unsigned long long>::value;
};
}

View File

@ -2029,7 +2029,7 @@ namespace etl
ETL_STATIC_ASSERT((MAX_SIZE_ > 0U), "Zero capacity etl::list is not valid");
static const size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
public:

View File

@ -2175,7 +2175,7 @@ namespace etl
{
public:
static const size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
//*************************************************************************
/// Default constructor.

View File

@ -2037,7 +2037,7 @@ namespace etl
{
public:
static const size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
//*************************************************************************
/// Default constructor.

View File

@ -2021,7 +2021,7 @@ namespace etl
{
public:
static const size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
//*************************************************************************
/// Default constructor.

View File

@ -226,13 +226,13 @@ namespace etl
value_type hash;
value_type seed;
static const uint8_t FULL_BLOCK = 4;
static const value_type CONSTANT1 = 0xCC9E2D51;
static const value_type CONSTANT2 = 0x1B873593;
static const value_type SHIFT1 = 15;
static const value_type SHIFT2 = 13;
static const value_type MULTIPLY = 5;
static const value_type ADD = 0xE6546B64;
static ETL_CONSTANT uint8_t FULL_BLOCK = 4;
static ETL_CONSTANT value_type CONSTANT1 = 0xCC9E2D51;
static ETL_CONSTANT value_type CONSTANT2 = 0x1B873593;
static ETL_CONSTANT value_type SHIFT1 = 15;
static ETL_CONSTANT value_type SHIFT2 = 13;
static ETL_CONSTANT value_type MULTIPLY = 5;
static ETL_CONSTANT value_type ADD = 0xE6546B64;
};
}

View File

@ -116,7 +116,7 @@ namespace etl
//*************************************************************************
void add(uint8_t value_)
{
static const uint8_t PEARSON_LOOKUP[] =
static ETL_CONSTANT uint8_t PEARSON_LOOKUP[] =
{
228, 39, 61, 95, 227, 187, 0, 197, 31, 189, 161, 222, 34, 15, 221, 246,
19, 234, 6, 50, 113, 3, 91, 63, 77, 245, 144, 2, 183, 196, 25, 226,

View File

@ -419,7 +419,7 @@ namespace etl
typedef typename TContainer::size_type size_type;
static const size_type MAX_SIZE = size_type(SIZE);
static ETL_CONSTANT size_type MAX_SIZE = size_type(SIZE);
//*************************************************************************
/// Default constructor.

View File

@ -588,7 +588,7 @@ namespace etl
ETL_STATIC_ASSERT((SIZE <= etl::integral_limits<size_type>::max), "Size too large for memory model");
static const size_type MAX_SIZE = size_type(SIZE);
static ETL_CONSTANT size_type MAX_SIZE = size_type(SIZE);
//*************************************************************************
/// Default constructor.

View File

@ -601,7 +601,7 @@ namespace etl
ETL_STATIC_ASSERT((SIZE <= etl::integral_limits<size_type>::max), "Size too large for memory model");
static const size_type MAX_SIZE = size_type(SIZE);
static ETL_CONSTANT size_type MAX_SIZE = size_type(SIZE);
//*************************************************************************
/// Default constructor.

View File

@ -474,13 +474,13 @@ namespace etl
private:
static const size_type RESERVED_SIZE = size_type(SIZE + 1);
static ETL_CONSTANT size_type RESERVED_SIZE = size_type(SIZE + 1);
public:
ETL_STATIC_ASSERT((SIZE <= (etl::integral_limits<size_type>::max - 1)), "Size too large for memory model");
static const size_type MAX_SIZE = size_type(SIZE);
static ETL_CONSTANT size_type MAX_SIZE = size_type(SIZE);
//*************************************************************************
/// Default constructor.

View File

@ -706,7 +706,7 @@ namespace etl
ETL_STATIC_ASSERT((SIZE <= etl::integral_limits<size_type>::max), "Size too large for memory model");
static const size_type MAX_SIZE = size_type(SIZE);
static ETL_CONSTANT size_type MAX_SIZE = size_type(SIZE);
//*************************************************************************
/// Default constructor.

View File

@ -763,7 +763,7 @@ namespace etl
ETL_STATIC_ASSERT((SIZE <= etl::integral_limits<size_type>::max), "Size too large for memory model");
static const size_type MAX_SIZE = size_type(SIZE);
static ETL_CONSTANT size_type MAX_SIZE = size_type(SIZE);
//*************************************************************************
/// Default constructor.

View File

@ -218,8 +218,8 @@ namespace etl
private:
static const uint32_t a = 40014;
static const uint32_t m = 2147483563;
static ETL_CONSTANT uint32_t a = 40014;
static ETL_CONSTANT uint32_t m = 2147483563;
uint32_t value;
};
@ -271,7 +271,7 @@ namespace etl
//***************************************************************************
uint32_t operator()()
{
static const uint32_t m = ((m1 > m2) ? m1 : m2);
static ETL_CONSTANT uint32_t m = ((m1 > m2) ? m1 : m2);
value1 = (a1 * value1) % m1;
value2 = (a2 * value2) % m2;
@ -294,11 +294,11 @@ namespace etl
private:
static const uint32_t a1 = 40014;
static const uint32_t m1 = 2147483563;
static ETL_CONSTANT uint32_t a1 = 40014;
static ETL_CONSTANT uint32_t m1 = 2147483563;
static const uint32_t a2 = 40692;
static const uint32_t m2 = 2147483399;
static ETL_CONSTANT uint32_t a2 = 40692;
static ETL_CONSTANT uint32_t m2 = 2147483399;
uint32_t value1;
uint32_t value2;
@ -350,7 +350,7 @@ namespace etl
//***************************************************************************
uint32_t operator()()
{
static const uint32_t polynomial = 0x80200003;
static ETL_CONSTANT uint32_t polynomial = 0x80200003;
value >>= 1;
@ -514,8 +514,8 @@ namespace etl
private:
static const uint64_t multiplier = 6364136223846793005ULL;
static const uint64_t increment = 1ULL;
static ETL_CONSTANT uint64_t multiplier = 6364136223846793005ULL;
static ETL_CONSTANT uint64_t increment = 1ULL;
uint64_t value;
};

View File

@ -223,7 +223,7 @@ namespace etl
ETL_STATIC_ASSERT((etl::is_base_of<etl::imessage, TMessage1>::value), "TMessage7 not derived from etl::imessage");
ETL_STATIC_ASSERT((etl::is_base_of<etl::imessage, TMessage1>::value), "TMessage8 not derived from etl::imessage");
static const size_t max_size = etl::largest<etl::reference_counted_message<TMessage1, TCounter>,
static ETL_CONSTANT size_t max_size = etl::largest<etl::reference_counted_message<TMessage1, TCounter>,
etl::reference_counted_message<TMessage2, TCounter>,
etl::reference_counted_message<TMessage3, TCounter>,
etl::reference_counted_message<TMessage4, TCounter>,
@ -233,7 +233,7 @@ namespace etl
etl::reference_counted_message<TMessage8, TCounter> >::size;
static const size_t max_alignment = etl::largest<etl::reference_counted_message<TMessage1, TCounter>,
static ETL_CONSTANT size_t max_alignment = etl::largest<etl::reference_counted_message<TMessage1, TCounter>,
etl::reference_counted_message<TMessage2, TCounter>,
etl::reference_counted_message<TMessage3, TCounter>,
etl::reference_counted_message<TMessage4, TCounter>,

View File

@ -923,7 +923,7 @@ namespace etl
{
public:
static const size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
//*************************************************************************
/// Constructor.

View File

@ -826,7 +826,7 @@ namespace etl
{
public:
static const size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
//*************************************************************************
/// Constructor.

View File

@ -807,7 +807,7 @@ namespace etl
{
public:
static const size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
//*************************************************************************
/// Constructor.

View File

@ -791,7 +791,7 @@ namespace etl
{
public:
static const size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
//*************************************************************************
/// Constructor.

View File

@ -2101,7 +2101,7 @@ namespace etl
{
public:
static const size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
//*************************************************************************
/// Default constructor.

View File

@ -290,9 +290,9 @@ namespace etl
private:
// Determines the index of the best unsigned type for the required number of bits.
static const int TYPE_INDEX = ((NBITS > 8) ? 1 : 0) +
((NBITS > 16) ? 1 : 0) +
((NBITS > 32) ? 1 : 0);
static ETL_CONSTANT int TYPE_INDEX = ((NBITS > 8) ? 1 : 0) +
((NBITS > 16) ? 1 : 0) +
((NBITS > 32) ? 1 : 0);
public:
@ -316,9 +316,9 @@ namespace etl
private:
// Determines the index of the best unsigned type for the required number of bits.
static const int TYPE_INDEX = ((NBITS > 8) ? 1 : 0) +
((NBITS > 16) ? 1 : 0) +
((NBITS > 32) ? 1 : 0);
static ETL_CONSTANT int TYPE_INDEX = ((NBITS > 8) ? 1 : 0) +
((NBITS > 16) ? 1 : 0) +
((NBITS > 32) ? 1 : 0);
public:
@ -342,9 +342,9 @@ namespace etl
private:
// Determines the index of the best unsigned type for the required value.
static const int TYPE_INDEX = ((VALUE > UINT_LEAST8_MAX) ? 1 : 0) +
((VALUE > UINT16_MAX) ? 1 : 0) +
((VALUE > UINT32_MAX) ? 1 : 0);
static ETL_CONSTANT int TYPE_INDEX = ((VALUE > UINT_LEAST8_MAX) ? 1 : 0) +
((VALUE > UINT16_MAX) ? 1 : 0) +
((VALUE > UINT32_MAX) ? 1 : 0);
public:
@ -368,9 +368,9 @@ namespace etl
private:
// Determines the index of the best signed type for the required value.
static const int TYPE_INDEX = (((VALUE > intmax_t(INT_LEAST8_MAX)) || (VALUE < intmax_t(INT_LEAST8_MIN))) ? 1 : 0) +
(((VALUE > intmax_t(INT16_MAX)) || (VALUE < intmax_t(INT16_MIN))) ? 1 : 0) +
(((VALUE > intmax_t(INT32_MAX)) || (VALUE < intmax_t(INT32_MIN))) ? 1 : 0);
static ETL_CONSTANT int TYPE_INDEX = (((VALUE > intmax_t(INT_LEAST8_MAX)) || (VALUE < intmax_t(INT_LEAST8_MIN))) ? 1 : 0) +
(((VALUE > intmax_t(INT16_MAX)) || (VALUE < intmax_t(INT16_MIN))) ? 1 : 0) +
(((VALUE > intmax_t(INT32_MAX)) || (VALUE < intmax_t(INT32_MIN))) ? 1 : 0);
public:

View File

@ -529,7 +529,7 @@ namespace etl
{
public:
static const size_t MAX_SIZE = SIZE;
static ETL_CONSTANT size_t MAX_SIZE = SIZE;
//*************************************************************************
/// Default constructor.

View File

@ -63,7 +63,7 @@ namespace etl
typedef istring::value_type value_type;
static const size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
//*************************************************************************
/// Constructor.

View File

@ -1540,8 +1540,8 @@ namespace etl
public:
static const size_t MAX_SIZE = MAX_SIZE_;
static const size_t MAX_BUCKETS = MAX_BUCKETS_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_BUCKETS = MAX_BUCKETS_;
//*************************************************************************
/// Default constructor.

View File

@ -1446,8 +1446,8 @@ namespace etl
public:
static const size_t MAX_SIZE = MAX_SIZE_;
static const size_t MAX_BUCKETS = MAX_BUCKETS_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_BUCKETS = MAX_BUCKETS_;
//*************************************************************************
/// Default constructor.

View File

@ -1430,8 +1430,8 @@ namespace etl
public:
static const size_t MAX_SIZE = MAX_SIZE_;
static const size_t MAX_BUCKETS = MAX_BUCKETS_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_BUCKETS = MAX_BUCKETS_;
//*************************************************************************

View File

@ -1430,8 +1430,8 @@ namespace etl
public:
static const size_t MAX_SIZE = MAX_SIZE_;
static const size_t MAX_BUCKETS = MAX_BUCKETS_;
static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
static ETL_CONSTANT size_t MAX_BUCKETS = MAX_BUCKETS_;
//*************************************************************************
/// Default constructor.