C++98/03 compatibility changes

This commit is contained in:
John Wellbelove 2020-03-27 13:11:17 +00:00
parent d199647ec1
commit d59f53fe25
27 changed files with 976 additions and 589 deletions

View File

@ -17,6 +17,7 @@ extern "C"
#include "etl/callback_timer.h" #include "etl/callback_timer.h"
#include "etl/vector.h" #include "etl/vector.h"
#include "etl/iterator.h" #include "etl/iterator.h"
#include "etl/binary.h"
struct FP struct FP
{ {

View File

@ -99,7 +99,11 @@ namespace etl
{ {
public: public:
#if defined(ETL_NO_64BIT_TYPES)
typedef typename private_alignment::type_with_alignment_helper<ALIGNMENT, int_least8_t, int_least16_t, int32_t, float, double, void*>::type type;
#else
typedef typename private_alignment::type_with_alignment_helper<ALIGNMENT, int_least8_t, int_least16_t, int32_t, int64_t, float, double, void*>::type type; typedef typename private_alignment::type_with_alignment_helper<ALIGNMENT, int_least8_t, int_least16_t, int32_t, int64_t, float, double, void*>::type type;
#endif
}; };
//*************************************************************************** //***************************************************************************

View File

@ -763,24 +763,30 @@ namespace etl
typedef etl::atomic<int16_t> atomic_int16_t; typedef etl::atomic<int16_t> atomic_int16_t;
typedef etl::atomic<uint32_t> atomic_uint32_t; typedef etl::atomic<uint32_t> atomic_uint32_t;
typedef etl::atomic<int32_t> atomic_int32_t; typedef etl::atomic<int32_t> atomic_int32_t;
#if !defined(ETL_NO_64BIT_TYPES)
typedef etl::atomic<uint64_t> atomic_uint64_t; typedef etl::atomic<uint64_t> atomic_uint64_t;
typedef etl::atomic<int64_t> atomic_int64_t; typedef etl::atomic<int64_t> atomic_int64_t;
#endif
typedef etl::atomic<int_least8_t> atomic_int_least8_t; typedef etl::atomic<int_least8_t> atomic_int_least8_t;
typedef etl::atomic<uint_least8_t> atomic_uint_least8_t; typedef etl::atomic<uint_least8_t> atomic_uint_least8_t;
typedef etl::atomic<int_least16_t> atomic_int_least16_t; typedef etl::atomic<int_least16_t> atomic_int_least16_t;
typedef etl::atomic<uint_least16_t> atomic_uint_least16_t; typedef etl::atomic<uint_least16_t> atomic_uint_least16_t;
typedef etl::atomic<int_least32_t> atomic_int_least32_t; typedef etl::atomic<int_least32_t> atomic_int_least32_t;
typedef etl::atomic<uint_least32_t> atomic_uint_least32_t; typedef etl::atomic<uint_least32_t> atomic_uint_least32_t;
#if !defined(ETL_NO_64BIT_TYPES)
typedef etl::atomic<int_least64_t> atomic_int_least64_t; typedef etl::atomic<int_least64_t> atomic_int_least64_t;
typedef etl::atomic<uint_least64_t> atomic_uint_least64_t; typedef etl::atomic<uint_least64_t> atomic_uint_least64_t;
#endif
typedef etl::atomic<int_fast8_t> atomic_int_fast8_t; typedef etl::atomic<int_fast8_t> atomic_int_fast8_t;
typedef etl::atomic<uint_fast8_t> atomic_uint_fast8_t; typedef etl::atomic<uint_fast8_t> atomic_uint_fast8_t;
typedef etl::atomic<int_fast16_t> atomic_int_fast16_t; typedef etl::atomic<int_fast16_t> atomic_int_fast16_t;
typedef etl::atomic<uint_fast16_t> atomic_uint_fast16_t; typedef etl::atomic<uint_fast16_t> atomic_uint_fast16_t;
typedef etl::atomic<int_fast32_t> atomic_int_fast32_t; typedef etl::atomic<int_fast32_t> atomic_int_fast32_t;
typedef etl::atomic<uint_fast32_t> atomic_uint_fast32_t; typedef etl::atomic<uint_fast32_t> atomic_uint_fast32_t;
#if !defined(ETL_NO_64BIT_TYPES)
typedef etl::atomic<int_fast64_t> atomic_int_fast64_t; typedef etl::atomic<int_fast64_t> atomic_int_fast64_t;
typedef etl::atomic<uint_fast64_t> atomic_uint_fast64_t; typedef etl::atomic<uint_fast64_t> atomic_uint_fast64_t;
#endif
typedef etl::atomic<intptr_t> atomic_intptr_t; typedef etl::atomic<intptr_t> atomic_intptr_t;
typedef etl::atomic<uintptr_t> atomic_uintptr_t; typedef etl::atomic<uintptr_t> atomic_uintptr_t;
typedef etl::atomic<size_t> atomic_size_t; typedef etl::atomic<size_t> atomic_size_t;

View File

@ -576,24 +576,30 @@ namespace etl
typedef std::atomic<int16_t> atomic_int16_t; typedef std::atomic<int16_t> atomic_int16_t;
typedef std::atomic<uint32_t> atomic_uint32_t; typedef std::atomic<uint32_t> atomic_uint32_t;
typedef std::atomic<int32_t> atomic_int32_t; typedef std::atomic<int32_t> atomic_int32_t;
#if !defined(ETL_NO_64BIT_TYPES)
typedef std::atomic<uint64_t> atomic_uint64_t; typedef std::atomic<uint64_t> atomic_uint64_t;
typedef std::atomic<int64_t> atomic_int64_t; typedef std::atomic<int64_t> atomic_int64_t;
#endif
typedef std::atomic<int_least8_t> atomic_int_least8_t; typedef std::atomic<int_least8_t> atomic_int_least8_t;
typedef std::atomic<uint_least8_t> atomic_uint_least8_t; typedef std::atomic<uint_least8_t> atomic_uint_least8_t;
typedef std::atomic<int_least16_t> atomic_int_least16_t; typedef std::atomic<int_least16_t> atomic_int_least16_t;
typedef std::atomic<uint_least16_t> atomic_uint_least16_t; typedef std::atomic<uint_least16_t> atomic_uint_least16_t;
typedef std::atomic<int_least32_t> atomic_int_least32_t; typedef std::atomic<int_least32_t> atomic_int_least32_t;
typedef std::atomic<uint_least32_t> atomic_uint_least32_t; typedef std::atomic<uint_least32_t> atomic_uint_least32_t;
#if !defined(ETL_NO_64BIT_TYPES)
typedef std::atomic<int_least64_t> atomic_int_least64_t; typedef std::atomic<int_least64_t> atomic_int_least64_t;
typedef std::atomic<uint_least64_t> atomic_uint_least64_t; typedef std::atomic<uint_least64_t> atomic_uint_least64_t;
#endif
typedef std::atomic<int_fast8_t> atomic_int_fast8_t; typedef std::atomic<int_fast8_t> atomic_int_fast8_t;
typedef std::atomic<uint_fast8_t> atomic_uint_fast8_t; typedef std::atomic<uint_fast8_t> atomic_uint_fast8_t;
typedef std::atomic<int_fast16_t> atomic_int_fast16_t; typedef std::atomic<int_fast16_t> atomic_int_fast16_t;
typedef std::atomic<uint_fast16_t> atomic_uint_fast16_t; typedef std::atomic<uint_fast16_t> atomic_uint_fast16_t;
typedef std::atomic<int_fast32_t> atomic_int_fast32_t; typedef std::atomic<int_fast32_t> atomic_int_fast32_t;
typedef std::atomic<uint_fast32_t> atomic_uint_fast32_t; typedef std::atomic<uint_fast32_t> atomic_uint_fast32_t;
#if !defined(ETL_NO_64BIT_TYPES)
typedef std::atomic<int_fast64_t> atomic_int_fast64_t; typedef std::atomic<int_fast64_t> atomic_int_fast64_t;
typedef std::atomic<uint_fast64_t> atomic_uint_fast64_t; typedef std::atomic<uint_fast64_t> atomic_uint_fast64_t;
#endif
typedef std::atomic<intptr_t> atomic_intptr_t; typedef std::atomic<intptr_t> atomic_intptr_t;
typedef std::atomic<uintptr_t> atomic_uintptr_t; typedef std::atomic<uintptr_t> atomic_uintptr_t;
typedef std::atomic<size_t> atomic_size_t; typedef std::atomic<size_t> atomic_size_t;

View File

@ -38,6 +38,7 @@ SOFTWARE.
#include "platform.h" #include "platform.h"
#include "type_traits.h" #include "type_traits.h"
#include "integral_limits.h" #include "integral_limits.h"
#include "limits.h"
#include "static_assert.h" #include "static_assert.h"
#include "log.h" #include "log.h"
#include "power.h" #include "power.h"
@ -45,8 +46,6 @@ SOFTWARE.
#include "exception.h" #include "exception.h"
#include "error_handler.h" #include "error_handler.h"
#include "limits.h"
#undef ETL_FILE #undef ETL_FILE
#define ETL_FILE "50" #define ETL_FILE "50"
@ -103,12 +102,17 @@ namespace etl
template <const size_t NBITS> template <const size_t NBITS>
const typename max_value_for_nbits<NBITS>::value_type max_value_for_nbits<NBITS>::value; const typename max_value_for_nbits<NBITS>::value_type max_value_for_nbits<NBITS>::value;
#if ETL_CPP17_SUPPORTED
template <const size_t NBITS>
inline constexpr typename etl::max_value_for_nbits<NBITS>::value_type max_value_for_nbits_v = max_value_for_nbits<NBITS>::value;
#endif
//*************************************************************************** //***************************************************************************
/// Rotate left. /// Rotate left.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename T> template <typename T>
T rotate_left(T value) ETL_CONSTEXPR14 T rotate_left(T value)
{ {
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type"); ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
@ -122,7 +126,7 @@ namespace etl
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename T> template <typename T>
T rotate_left(T value, size_t distance) ETL_CONSTEXPR14 T rotate_left(T value, size_t distance)
{ {
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type"); ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
@ -138,7 +142,7 @@ namespace etl
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename T> template <typename T>
T rotate_right(T value) ETL_CONSTEXPR14 T rotate_right(T value)
{ {
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type"); ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
@ -152,7 +156,7 @@ namespace etl
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename T> template <typename T>
T rotate_right(T value, size_t distance) ETL_CONSTEXPR14 T rotate_right(T value, size_t distance)
{ {
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type"); ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
@ -169,11 +173,11 @@ namespace etl
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename T> template <typename T>
T rotate(T value, typename etl::make_signed<size_t>::type distance) ETL_CONSTEXPR14 T rotate(T value, typename etl::make_signed<size_t>::type distance)
{ {
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type"); ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
T result; T result = T();
if (distance > 0) if (distance > 0)
{ {
@ -192,7 +196,7 @@ namespace etl
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename T> template <typename T>
T binary_to_gray(T value) ETL_CONSTEXPR T binary_to_gray(T value)
{ {
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type"); ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
@ -204,7 +208,7 @@ namespace etl
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename TReturn, const size_t NBITS, typename TValue> template <typename TReturn, const size_t NBITS, typename TValue>
TReturn fold_bits(TValue value) ETL_CONSTEXPR14 TReturn fold_bits(TValue value)
{ {
ETL_STATIC_ASSERT(integral_limits<TReturn>::bits >= NBITS, "Return type too small to hold result"); ETL_STATIC_ASSERT(integral_limits<TReturn>::bits >= NBITS, "Return type too small to hold result");
@ -233,7 +237,7 @@ namespace etl
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename TReturn, const size_t NBITS, typename TValue> template <typename TReturn, const size_t NBITS, typename TValue>
TReturn sign_extend(TValue value) ETL_CONSTEXPR14 TReturn sign_extend(TValue value)
{ {
ETL_STATIC_ASSERT(etl::is_integral<TValue>::value, "TValue not an integral type"); ETL_STATIC_ASSERT(etl::is_integral<TValue>::value, "TValue not an integral type");
ETL_STATIC_ASSERT(etl::is_integral<TReturn>::value, "TReturn not an integral type"); ETL_STATIC_ASSERT(etl::is_integral<TReturn>::value, "TReturn not an integral type");
@ -243,7 +247,7 @@ namespace etl
struct S struct S
{ {
signed value : NBITS; signed value : NBITS;
} s; } s = {0};
return (s.value = value); return (s.value = value);
} }
@ -255,7 +259,7 @@ namespace etl
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename TReturn, const size_t NBITS, const size_t SHIFT, typename TValue> template <typename TReturn, const size_t NBITS, const size_t SHIFT, typename TValue>
TReturn sign_extend(TValue value) ETL_CONSTEXPR14 TReturn sign_extend(TValue value)
{ {
ETL_STATIC_ASSERT(etl::is_integral<TValue>::value, "TValue not an integral type"); ETL_STATIC_ASSERT(etl::is_integral<TValue>::value, "TValue not an integral type");
ETL_STATIC_ASSERT(etl::is_integral<TReturn>::value, "TReturn not an integral type"); ETL_STATIC_ASSERT(etl::is_integral<TReturn>::value, "TReturn not an integral type");
@ -266,7 +270,7 @@ namespace etl
struct S struct S
{ {
signed value : NBITS; signed value : NBITS;
} s; } s = {0};
return (s.value = (value >> SHIFT)); return (s.value = (value >> SHIFT));
} }
@ -277,7 +281,7 @@ namespace etl
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename TReturn, typename TValue> template <typename TReturn, typename TValue>
TReturn sign_extend(TValue value, const size_t NBITS) ETL_CONSTEXPR14 TReturn sign_extend(TValue value, const size_t NBITS)
{ {
ETL_STATIC_ASSERT(etl::is_integral<TValue>::value, "TValue not an integral type"); ETL_STATIC_ASSERT(etl::is_integral<TValue>::value, "TValue not an integral type");
ETL_STATIC_ASSERT(etl::is_integral<TReturn>::value, "TReturn not an integral type"); ETL_STATIC_ASSERT(etl::is_integral<TReturn>::value, "TReturn not an integral type");
@ -298,7 +302,7 @@ namespace etl
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename TReturn, typename TValue> template <typename TReturn, typename TValue>
TReturn sign_extend(TValue value, const size_t NBITS, const size_t SHIFT) ETL_CONSTEXPR14 TReturn sign_extend(TValue value, const size_t NBITS, const size_t SHIFT)
{ {
ETL_STATIC_ASSERT(etl::is_integral<TValue>::value, "TValue not an integral type"); ETL_STATIC_ASSERT(etl::is_integral<TValue>::value, "TValue not an integral type");
ETL_STATIC_ASSERT(etl::is_integral<TReturn>::value, "TReturn not an integral type"); ETL_STATIC_ASSERT(etl::is_integral<TReturn>::value, "TReturn not an integral type");
@ -312,15 +316,13 @@ namespace etl
return TReturn((value ^ mask) - mask); return TReturn((value ^ mask) - mask);
} }
//*************************************************************************** //***************************************************************************
/// Find the position of the first set bit. /// Find the position of the first set bit.
/// Starts from LSB. /// Starts from LSB.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename T> template <typename T>
uint_least8_t first_set_bit_position(T value) ETL_CONSTEXPR14 uint_least8_t first_set_bit_position(T value)
{ {
return count_trailing_zeros(value); return count_trailing_zeros(value);
} }
@ -331,7 +333,7 @@ namespace etl
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename T> template <typename T>
uint_least8_t first_clear_bit_position(T value) ETL_CONSTEXPR14 uint_least8_t first_clear_bit_position(T value)
{ {
value = ~value; value = ~value;
return count_trailing_zeros(value); return count_trailing_zeros(value);
@ -343,7 +345,7 @@ namespace etl
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename T> template <typename T>
uint_least8_t first_bit_position(bool state, T value) ETL_CONSTEXPR14 uint_least8_t first_bit_position(bool state, T value)
{ {
if (!state) if (!state)
{ {
@ -368,145 +370,60 @@ namespace etl
template <const size_t POSITION> template <const size_t POSITION>
const typename bit<POSITION>::value_type bit<POSITION>::value; const typename bit<POSITION>::value_type bit<POSITION>::value;
#if ETL_CPP17_SUPPORTED
template <const size_t POSITION>
inline constexpr typename bit<POSITION>::value_type bit_v = bit<POSITION>::value;
#endif
//*************************************************************************** //***************************************************************************
/// Fills a value with a bit pattern. Compile time. /// Fills a value with a bit pattern.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename TResult, typename TValue = void*, const TValue VALUE = (void*)0> template <typename TResult, typename TValue>
class binary_fill ETL_CONSTEXPR TResult binary_fill(TValue value)
{ {
private:
ETL_STATIC_ASSERT(sizeof(TResult) >= sizeof(TValue), "Result must be at least as large as the fill value"); ETL_STATIC_ASSERT(sizeof(TResult) >= sizeof(TValue), "Result must be at least as large as the fill value");
ETL_STATIC_ASSERT(VALUE <= etl::integral_limits<typename etl::make_unsigned<TValue>::type>::max, "Value is too large for specified type");
typedef typename etl::make_unsigned<TResult>::type unsigned_r_t; typedef typename etl::make_unsigned<TResult>::type unsigned_r_t;
typedef typename etl::make_unsigned<TValue>::type unsigned_v_t; typedef typename etl::make_unsigned<TValue>::type unsigned_v_t;
public: return TResult(unsigned_v_t(value) * (unsigned_r_t(~unsigned_r_t(0U)) / unsigned_v_t(~unsigned_v_t(0U))));
}
static const TResult value = TResult(unsigned_v_t(VALUE) * (unsigned_r_t(~unsigned_r_t(0U)) / unsigned_v_t(~unsigned_v_t(0U))));
};
template <typename TResult, typename TValue, const TValue VALUE>
const TResult binary_fill<TResult, TValue, VALUE>::value;
//***************************************************************************
/// Fills a value with a bit pattern. Run time.
///\ingroup binary
//***************************************************************************
template <typename TResult>
class binary_fill<TResult, void*, (void*)0>
{
private:
typedef typename etl::make_unsigned<TResult>::type unsigned_r_t;
public:
template <typename TValue>
static TResult value(TValue value)
{
ETL_STATIC_ASSERT(sizeof(TResult) >= sizeof(TValue), "Result must be at least as large as the fill value");
typedef typename etl::make_unsigned<TValue>::type unsigned_v_t;
return TResult(unsigned_v_t(value) * (unsigned_r_t(~unsigned_r_t(0U)) / unsigned_v_t(~unsigned_v_t(0U))));
}
};
#if ETL_8BIT_SUPPORT #if ETL_8BIT_SUPPORT
//*************************************************************************** //***************************************************************************
/// Detects the presence of zero bytes. Compile time. /// Detects the presence of zero bytes.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename TValue = void*, const TValue VALUE = (void*)0> template <typename TValue>
class has_zero_byte ETL_CONSTEXPR14 bool has_zero_byte(const TValue value)
{ {
private:
typedef typename etl::make_unsigned<TValue>::type unsigned_t; typedef typename etl::make_unsigned<TValue>::type unsigned_t;
const unsigned_t mask = etl::binary_fill<unsigned_t, uint8_t>(0x7FU);
const unsigned_t temp = unsigned_t(~((((unsigned_t(value) & mask) + mask) | unsigned_t(value)) | mask));
static const unsigned_t mask = etl::binary_fill<TValue, uint8_t, 0x7FU>::value; return (temp != 0U);
}
public:
static const bool test = unsigned_t(~((((unsigned_t(VALUE) & mask) + mask) | unsigned_t(VALUE)) | mask)) != 0U;
};
template <typename TValue, const TValue VALUE>
const typename etl::make_unsigned<TValue>::type has_zero_byte<TValue, VALUE>::mask;
template <typename TValue, const TValue VALUE>
const bool has_zero_byte<TValue, VALUE>::test;
//***************************************************************************
/// Detects the presence of zero bytes. Run time.
///\ingroup binary
//***************************************************************************
template <>
class has_zero_byte<void*, (void*)0>
{
public:
template <typename TValue>
static bool test(TValue value)
{
typedef typename etl::make_unsigned<TValue>::type unsigned_t;
static const unsigned_t mask = etl::binary_fill<TValue, uint8_t, 0x7FU>::value;
const unsigned_t temp = unsigned_t(~((((unsigned_t(value) & mask) + mask) | unsigned_t(value)) | mask));
return (temp != 0U);
}
};
//***************************************************************************
/// Detects the presence of a byte of value N. Compile time.
///\ingroup binary
//***************************************************************************
template <const uint8_t N = 0, typename TValue = void*, const TValue VALUE = (void*)0>
class has_byte_n
{
public:
static const bool test = etl::has_zero_byte<TValue, TValue(VALUE ^ etl::binary_fill<TValue, uint8_t, N>::value)>::test;
};
template <const uint8_t N, typename TValue, const TValue VALUE>
const bool has_byte_n<N, TValue, VALUE>::test;
//***************************************************************************
/// Detects the presence of a byte of value N. Partial run time.
///\ingroup binary
//***************************************************************************
template <const uint8_t N>
class has_byte_n<N, void*, (void*)0>
{
public:
template <typename TValue>
static bool test(TValue value)
{
return etl::has_zero_byte<>::test(TValue(value ^ etl::binary_fill<TValue, uint8_t, N>::value));
}
};
//*************************************************************************** //***************************************************************************
/// Detects the presence of a byte of value N. Run time. /// Detects the presence of a byte of value N. Run time.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <> template <typename TValue>
class has_byte_n<0, void*, (void*)0> ETL_CONSTEXPR14 bool has_byte_n(TValue value, uint8_t n)
{ {
public: return etl::has_zero_byte(TValue(value ^ etl::binary_fill<TValue, uint8_t>(n)));
}
template <typename TValue> //***************************************************************************
static bool test(TValue value, uint8_t n) /// Detects the presence of a byte of value N. Partial time.
{ ///\ingroup binary
return etl::has_zero_byte<>::test(TValue(value ^ etl::binary_fill<TValue>::template value<uint8_t>(n))); //***************************************************************************
} template <typename TValue, const TValue N>
}; ETL_CONSTEXPR14 bool has_byte_n(TValue value)
{
return etl::has_zero_byte(TValue(value ^ etl::binary_fill<TValue, uint8_t>(N)));
}
#endif #endif
//*************************************************************************** //***************************************************************************
@ -516,7 +433,7 @@ namespace etl
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename T> template <typename T>
T binary_merge(const T first, const T second, const T mask) ETL_CONSTEXPR T binary_merge(const T first, const T second, const T mask)
{ {
return second ^ ((second ^ first) & mask); return second ^ ((second ^ first) & mask);
} }
@ -528,7 +445,7 @@ namespace etl
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename T, const T MASK> template <typename T, const T MASK>
T binary_merge(const T first, const T second) ETL_CONSTEXPR T binary_merge(const T first, const T second)
{ {
return second ^ ((second ^ first) & MASK); return second ^ ((second ^ first) & MASK);
} }
@ -538,7 +455,7 @@ namespace etl
/// Reverse 8 bits. /// Reverse 8 bits.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint8_t reverse_bits(uint8_t value) inline ETL_CONSTEXPR14 uint8_t reverse_bits(uint8_t value)
{ {
value = ((value & 0xAA) >> 1) | ((value & 0x55) << 1); value = ((value & 0xAA) >> 1) | ((value & 0x55) << 1);
value = ((value & 0xCC) >> 2) | ((value & 0x33) << 2); value = ((value & 0xCC) >> 2) | ((value & 0x33) << 2);
@ -547,7 +464,7 @@ namespace etl
return value; return value;
} }
inline int8_t reverse_bits(int8_t value) inline ETL_CONSTEXPR14 int8_t reverse_bits(int8_t value)
{ {
return int8_t(reverse_bits(uint8_t(value))); return int8_t(reverse_bits(uint8_t(value)));
} }
@ -557,7 +474,7 @@ namespace etl
/// Reverse 16 bits. /// Reverse 16 bits.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint16_t reverse_bits(uint16_t value) inline ETL_CONSTEXPR14 uint16_t reverse_bits(uint16_t value)
{ {
value = ((value & 0xAAAA) >> 1) | ((value & 0x5555) << 1); value = ((value & 0xAAAA) >> 1) | ((value & 0x5555) << 1);
value = ((value & 0xCCCC) >> 2) | ((value & 0x3333) << 2); value = ((value & 0xCCCC) >> 2) | ((value & 0x3333) << 2);
@ -567,7 +484,7 @@ namespace etl
return value; return value;
} }
inline int16_t reverse_bits(int16_t value) inline ETL_CONSTEXPR14 int16_t reverse_bits(int16_t value)
{ {
return int16_t(reverse_bits(uint16_t(value))); return int16_t(reverse_bits(uint16_t(value)));
} }
@ -576,7 +493,7 @@ namespace etl
/// Reverse 32 bits. /// Reverse 32 bits.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint32_t reverse_bits(uint32_t value) inline ETL_CONSTEXPR14 uint32_t reverse_bits(uint32_t value)
{ {
value = ((value & 0xAAAAAAAA) >> 1) | ((value & 0x55555555) << 1); value = ((value & 0xAAAAAAAA) >> 1) | ((value & 0x55555555) << 1);
value = ((value & 0xCCCCCCCC) >> 2) | ((value & 0x33333333) << 2); value = ((value & 0xCCCCCCCC) >> 2) | ((value & 0x33333333) << 2);
@ -587,16 +504,17 @@ namespace etl
return value; return value;
} }
inline int32_t reverse_bits(int32_t value) inline ETL_CONSTEXPR14 int32_t reverse_bits(int32_t value)
{ {
return int32_t(reverse_bits(uint32_t(value))); return int32_t(reverse_bits(uint32_t(value)));
} }
#if !defined(ETL_NO_64BIT_TYPES)
//*************************************************************************** //***************************************************************************
/// Reverse 64 bits. /// Reverse 64 bits.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint64_t reverse_bits(uint64_t value) inline ETL_CONSTEXPR14 uint64_t reverse_bits(uint64_t value)
{ {
value = ((value & 0xAAAAAAAAAAAAAAAA) >> 1) | ((value & 0x5555555555555555) << 1); value = ((value & 0xAAAAAAAAAAAAAAAA) >> 1) | ((value & 0x5555555555555555) << 1);
value = ((value & 0xCCCCCCCCCCCCCCCC) >> 2) | ((value & 0x3333333333333333) << 2); value = ((value & 0xCCCCCCCCCCCCCCCC) >> 2) | ((value & 0x3333333333333333) << 2);
@ -608,22 +526,23 @@ namespace etl
return value; return value;
} }
inline int64_t reverse_bits(int64_t value) inline ETL_CONSTEXPR14 int64_t reverse_bits(int64_t value)
{ {
return int64_t(reverse_bits(uint64_t(value))); return int64_t(reverse_bits(uint64_t(value)));
} }
#endif
//*************************************************************************** //***************************************************************************
/// Reverse bytes 8 bit. /// Reverse bytes 8 bit.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
#if ETL_8BIT_SUPPORT #if ETL_8BIT_SUPPORT
inline uint8_t reverse_bytes(uint8_t value) inline ETL_CONSTEXPR uint8_t reverse_bytes(uint8_t value)
{ {
return value; return value;
} }
inline int8_t reverse_bytes(int8_t value) inline ETL_CONSTEXPR int8_t reverse_bytes(int8_t value)
{ {
return value; return value;
} }
@ -633,14 +552,12 @@ namespace etl
/// Reverse bytes 16 bit. /// Reverse bytes 16 bit.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint16_t reverse_bytes(uint16_t value) inline ETL_CONSTEXPR uint16_t reverse_bytes(uint16_t value)
{ {
value = (value >> 8) | (value << 8); return (value >> 8) | (value << 8);
return value;
} }
inline int16_t reverse_bytes(int16_t value) inline ETL_CONSTEXPR int16_t reverse_bytes(int16_t value)
{ {
return int16_t(reverse_bytes(uint16_t(value))); return int16_t(reverse_bytes(uint16_t(value)));
} }
@ -649,7 +566,7 @@ namespace etl
/// Reverse bytes 32 bit. /// Reverse bytes 32 bit.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint32_t reverse_bytes(uint32_t value) inline ETL_CONSTEXPR14 uint32_t reverse_bytes(uint32_t value)
{ {
value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8);
value = (value >> 16) | (value << 16); value = (value >> 16) | (value << 16);
@ -657,16 +574,17 @@ namespace etl
return value; return value;
} }
inline int32_t reverse_bytes(int32_t value) inline ETL_CONSTEXPR14 int32_t reverse_bytes(int32_t value)
{ {
return int32_t(reverse_bytes(uint32_t(value))); return int32_t(reverse_bytes(uint32_t(value)));
} }
#if !defined(ETL_NO_64BIT_TYPES)
//*************************************************************************** //***************************************************************************
/// Reverse bytes 64 bit. /// Reverse bytes 64 bit.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint64_t reverse_bytes(uint64_t value) inline ETL_CONSTEXPR14 uint64_t reverse_bytes(uint64_t value)
{ {
value = ((value & 0xFF00FF00FF00FF00) >> 8) | ((value & 0x00FF00FF00FF00FF) << 8); value = ((value & 0xFF00FF00FF00FF00) >> 8) | ((value & 0x00FF00FF00FF00FF) << 8);
value = ((value & 0xFFFF0000FFFF0000) >> 16) | ((value & 0x0000FFFF0000FFFF) << 16); value = ((value & 0xFFFF0000FFFF0000) >> 16) | ((value & 0x0000FFFF0000FFFF) << 16);
@ -675,17 +593,18 @@ namespace etl
return value; return value;
} }
inline int64_t reverse_bytes(int64_t value) inline ETL_CONSTEXPR14 int64_t reverse_bytes(int64_t value)
{ {
return int64_t(reverse_bytes(uint64_t(value))); return int64_t(reverse_bytes(uint64_t(value)));
} }
#endif
#if ETL_8BIT_SUPPORT #if ETL_8BIT_SUPPORT
//*************************************************************************** //***************************************************************************
/// Converts Gray code to binary. /// Converts Gray code to binary.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint8_t gray_to_binary(uint8_t value) inline ETL_CONSTEXPR14 uint8_t gray_to_binary(uint8_t value)
{ {
value ^= (value >> 4); value ^= (value >> 4);
value ^= (value >> 2); value ^= (value >> 2);
@ -694,7 +613,7 @@ namespace etl
return value; return value;
} }
inline int8_t gray_to_binary(int8_t value) inline ETL_CONSTEXPR14 int8_t gray_to_binary(int8_t value)
{ {
return int8_t(gray_to_binary(uint8_t(value))); return int8_t(gray_to_binary(uint8_t(value)));
} }
@ -704,7 +623,7 @@ namespace etl
/// Converts Gray code to binary. /// Converts Gray code to binary.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint16_t gray_to_binary(uint16_t value) inline ETL_CONSTEXPR14 uint16_t gray_to_binary(uint16_t value)
{ {
value ^= (value >> 8); value ^= (value >> 8);
value ^= (value >> 4); value ^= (value >> 4);
@ -714,7 +633,7 @@ namespace etl
return value; return value;
} }
inline int16_t gray_to_binary(int16_t value) inline ETL_CONSTEXPR14 int16_t gray_to_binary(int16_t value)
{ {
return int16_t(gray_to_binary(uint16_t(value))); return int16_t(gray_to_binary(uint16_t(value)));
} }
@ -723,7 +642,7 @@ namespace etl
/// Converts Gray code to binary. /// Converts Gray code to binary.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint32_t gray_to_binary(uint32_t value) inline ETL_CONSTEXPR14 uint32_t gray_to_binary(uint32_t value)
{ {
value ^= (value >> 16); value ^= (value >> 16);
value ^= (value >> 8); value ^= (value >> 8);
@ -734,16 +653,17 @@ namespace etl
return value; return value;
} }
inline int32_t gray_to_binary(int32_t value) inline ETL_CONSTEXPR14 int32_t gray_to_binary(int32_t value)
{ {
return int32_t(gray_to_binary(uint32_t(value))); return int32_t(gray_to_binary(uint32_t(value)));
} }
#if !defined(ETL_NO_64BIT_TYPES)
//*************************************************************************** //***************************************************************************
/// Converts Gray code to binary. /// Converts Gray code to binary.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint64_t gray_to_binary(uint64_t value) inline ETL_CONSTEXPR14 uint64_t gray_to_binary(uint64_t value)
{ {
value ^= (value >> 32); value ^= (value >> 32);
value ^= (value >> 16); value ^= (value >> 16);
@ -755,19 +675,20 @@ namespace etl
return value; return value;
} }
inline int64_t gray_to_binary(int64_t value) inline ETL_CONSTEXPR14 int64_t gray_to_binary(int64_t value)
{ {
return int64_t(gray_to_binary(uint64_t(value))); return int64_t(gray_to_binary(uint64_t(value)));
} }
#endif
#if ETL_8BIT_SUPPORT #if ETL_8BIT_SUPPORT
//*************************************************************************** //***************************************************************************
/// Count set bits. 8 bits. /// Count set bits. 8 bits.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint_least8_t count_bits(uint8_t value) inline ETL_CONSTEXPR14 uint_least8_t count_bits(uint8_t value)
{ {
uint32_t count; uint32_t count = 0U;
count = value - ((value >> 1) & 0x55); count = value - ((value >> 1) & 0x55);
count = ((count >> 2) & 0x33) + (count & 0x33); count = ((count >> 2) & 0x33) + (count & 0x33);
@ -776,7 +697,7 @@ namespace etl
return uint_least8_t(count); return uint_least8_t(count);
} }
inline uint_least8_t count_bits(int8_t value) inline ETL_CONSTEXPR14 uint_least8_t count_bits(int8_t value)
{ {
return count_bits(uint8_t(value)); return count_bits(uint8_t(value));
} }
@ -787,9 +708,9 @@ namespace etl
/// Count set bits. 16 bits. /// Count set bits. 16 bits.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint_least8_t count_bits(uint16_t value) inline ETL_CONSTEXPR14 uint_least8_t count_bits(uint16_t value)
{ {
uint32_t count; uint32_t count = 0U;
count = value - ((value >> 1) & 0x5555); count = value - ((value >> 1) & 0x5555);
count = ((count >> 2) & 0x3333) + (count & 0x3333); count = ((count >> 2) & 0x3333) + (count & 0x3333);
@ -799,7 +720,7 @@ namespace etl
return count; return count;
} }
inline uint_least8_t count_bits(int16_t value) inline ETL_CONSTEXPR14 uint_least8_t count_bits(int16_t value)
{ {
return count_bits(uint16_t(value)); return count_bits(uint16_t(value));
} }
@ -808,9 +729,9 @@ namespace etl
/// Count set bits. 32 bits. /// Count set bits. 32 bits.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint_least8_t count_bits(uint32_t value) inline ETL_CONSTEXPR14 uint_least8_t count_bits(uint32_t value)
{ {
uint32_t count; uint32_t count = 0U;
count = value - ((value >> 1) & 0x55555555); count = value - ((value >> 1) & 0x55555555);
count = ((count >> 2) & 0x33333333) + (count & 0x33333333); count = ((count >> 2) & 0x33333333) + (count & 0x33333333);
@ -821,18 +742,19 @@ namespace etl
return uint_least8_t(count); return uint_least8_t(count);
} }
inline uint_least8_t count_bits(int32_t value) inline ETL_CONSTEXPR14 uint_least8_t count_bits(int32_t value)
{ {
return count_bits(uint32_t(value)); return count_bits(uint32_t(value));
} }
#if !defined(ETL_NO_64BIT_TYPES)
//*************************************************************************** //***************************************************************************
/// Count set bits. 64 bits. /// Count set bits. 64 bits.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint_least8_t count_bits(uint64_t value) inline ETL_CONSTEXPR14 uint_least8_t count_bits(uint64_t value)
{ {
uint64_t count; uint64_t count = 0U;
count = value - ((value >> 1) & 0x5555555555555555); count = value - ((value >> 1) & 0x5555555555555555);
count = ((count >> 2) & 0x3333333333333333) + (count & 0x3333333333333333); count = ((count >> 2) & 0x3333333333333333) + (count & 0x3333333333333333);
@ -844,24 +766,25 @@ namespace etl
return uint_least8_t(count); return uint_least8_t(count);
} }
inline uint_least8_t count_bits(int64_t value) inline ETL_CONSTEXPR14 uint_least8_t count_bits(int64_t value)
{ {
return count_bits(uint64_t(value)); return count_bits(uint64_t(value));
} }
#endif
#if ETL_8BIT_SUPPORT #if ETL_8BIT_SUPPORT
//*************************************************************************** //***************************************************************************
/// Parity. 8bits. 0 = even, 1 = odd /// Parity. 8bits. 0 = even, 1 = odd
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint_least8_t parity(uint8_t value) inline ETL_CONSTEXPR14 uint_least8_t parity(uint8_t value)
{ {
value ^= value >> 4; value ^= value >> 4;
value &= 0x0F; value &= 0x0F;
return (0x6996 >> value) & 1; return (0x6996 >> value) & 1;
} }
inline uint_least8_t parity(int8_t value) inline ETL_CONSTEXPR14 uint_least8_t parity(int8_t value)
{ {
return parity(uint8_t(value)); return parity(uint8_t(value));
} }
@ -871,7 +794,7 @@ namespace etl
/// Parity. 16bits. 0 = even, 1 = odd /// Parity. 16bits. 0 = even, 1 = odd
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint_least8_t parity(uint16_t value) inline ETL_CONSTEXPR14 uint_least8_t parity(uint16_t value)
{ {
value ^= value >> 8; value ^= value >> 8;
value ^= value >> 4; value ^= value >> 4;
@ -879,7 +802,7 @@ namespace etl
return (0x6996 >> value) & 1; return (0x6996 >> value) & 1;
} }
inline uint_least8_t parity(int16_t value) inline ETL_CONSTEXPR14 uint_least8_t parity(int16_t value)
{ {
return parity(uint16_t(value)); return parity(uint16_t(value));
} }
@ -888,7 +811,7 @@ namespace etl
/// Parity. 32bits. 0 = even, 1 = odd /// Parity. 32bits. 0 = even, 1 = odd
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint_least8_t parity(uint32_t value) inline ETL_CONSTEXPR14 uint_least8_t parity(uint32_t value)
{ {
value ^= value >> 16; value ^= value >> 16;
value ^= value >> 8; value ^= value >> 8;
@ -897,16 +820,17 @@ namespace etl
return (0x6996 >> value) & 1; return (0x6996 >> value) & 1;
} }
inline uint_least8_t parity(int32_t value) inline ETL_CONSTEXPR14 uint_least8_t parity(int32_t value)
{ {
return parity(uint32_t(value)); return parity(uint32_t(value));
} }
#if !defined(ETL_NO_64BIT_TYPES)
//*************************************************************************** //***************************************************************************
/// Parity. 64bits. 0 = even, 1 = odd /// Parity. 64bits. 0 = even, 1 = odd
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint_least8_t parity(uint64_t value) inline ETL_CONSTEXPR14 uint_least8_t parity(uint64_t value)
{ {
value ^= value >> 32; value ^= value >> 32;
value ^= value >> 16; value ^= value >> 16;
@ -916,10 +840,11 @@ namespace etl
return (0x69966996 >> value) & 1; return (0x69966996 >> value) & 1;
} }
inline uint_least8_t parity(int64_t value) inline ETL_CONSTEXPR14 uint_least8_t parity(int64_t value)
{ {
return parity(uint64_t(value)); return parity(uint64_t(value));
} }
#endif
#if ETL_8BIT_SUPPORT #if ETL_8BIT_SUPPORT
//*************************************************************************** //***************************************************************************
@ -927,9 +852,9 @@ namespace etl
/// Uses a binary search. /// Uses a binary search.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint_least8_t count_trailing_zeros(uint8_t value) inline ETL_CONSTEXPR14 uint_least8_t count_trailing_zeros(uint8_t value)
{ {
uint_least8_t count; uint_least8_t count = 0U;
if (value & 0x1) if (value & 0x1)
{ {
@ -957,7 +882,7 @@ namespace etl
return count; return count;
} }
inline uint_least8_t count_trailing_zeros(int8_t value) inline ETL_CONSTEXPR14 uint_least8_t count_trailing_zeros(int8_t value)
{ {
return count_trailing_zeros(uint8_t(value)); return count_trailing_zeros(uint8_t(value));
} }
@ -968,9 +893,9 @@ namespace etl
/// Uses a binary search. /// Uses a binary search.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint_least8_t count_trailing_zeros(uint16_t value) inline ETL_CONSTEXPR14 uint_least8_t count_trailing_zeros(uint16_t value)
{ {
uint_least8_t count; uint_least8_t count = 0U;
if (value & 0x1) if (value & 0x1)
{ {
@ -1004,7 +929,7 @@ namespace etl
return count; return count;
} }
inline uint_least8_t count_trailing_zeros(int16_t value) inline ETL_CONSTEXPR14 uint_least8_t count_trailing_zeros(int16_t value)
{ {
return count_trailing_zeros(uint16_t(value)); return count_trailing_zeros(uint16_t(value));
} }
@ -1014,9 +939,9 @@ namespace etl
/// Uses a binary search. /// Uses a binary search.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint_least8_t count_trailing_zeros(uint32_t value) inline ETL_CONSTEXPR14 uint_least8_t count_trailing_zeros(uint32_t value)
{ {
uint_least8_t count; uint_least8_t count = 0U;
if (value & 0x1) if (value & 0x1)
{ {
@ -1056,19 +981,20 @@ namespace etl
return count; return count;
} }
inline uint_least8_t count_trailing_zeros(int32_t value) inline ETL_CONSTEXPR14 uint_least8_t count_trailing_zeros(int32_t value)
{ {
return count_trailing_zeros(uint32_t(value)); return count_trailing_zeros(uint32_t(value));
} }
#if !defined(ETL_NO_64BIT_TYPES)
//*************************************************************************** //***************************************************************************
/// Count trailing zeros. 64bit. /// Count trailing zeros. 64bit.
/// Uses a binary search. /// Uses a binary search.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
inline uint_least8_t count_trailing_zeros(uint64_t value) ETL_CONSTEXPR14 inline uint_least8_t count_trailing_zeros(uint64_t value)
{ {
uint_least8_t count; uint_least8_t count = 0U;
if (value & 0x1) if (value & 0x1)
{ {
@ -1114,17 +1040,18 @@ namespace etl
return count; return count;
} }
inline uint_least8_t count_trailing_zeros(int64_t value) inline ETL_CONSTEXPR14 uint_least8_t count_trailing_zeros(int64_t value)
{ {
return count_trailing_zeros(uint64_t(value)); return count_trailing_zeros(uint64_t(value));
} }
#endif
#if ETL_8BIT_SUPPORT #if ETL_8BIT_SUPPORT
//***************************************************************************** //*****************************************************************************
/// Binary interleave /// Binary interleave
///\ingroup binary ///\ingroup binary
//***************************************************************************** //*****************************************************************************
inline uint16_t binary_interleave(uint8_t first, uint8_t second) inline ETL_CONSTEXPR14 uint16_t binary_interleave(uint8_t first, uint8_t second)
{ {
uint16_t f = first; uint16_t f = first;
uint16_t s = second; uint16_t s = second;
@ -1140,7 +1067,7 @@ namespace etl
return (f | (s << 1)); return (f | (s << 1));
} }
inline int16_t binary_interleave(int8_t first, int8_t second) inline ETL_CONSTEXPR14 int16_t binary_interleave(int8_t first, int8_t second)
{ {
return int16_t(binary_interleave(uint8_t(first), uint8_t(second))); return int16_t(binary_interleave(uint8_t(first), uint8_t(second)));
} }
@ -1150,7 +1077,7 @@ namespace etl
/// Binary interleave /// Binary interleave
///\ingroup binary ///\ingroup binary
//***************************************************************************** //*****************************************************************************
inline uint32_t binary_interleave(uint16_t first, uint16_t second) inline ETL_CONSTEXPR14 uint32_t binary_interleave(uint16_t first, uint16_t second)
{ {
uint32_t f = first; uint32_t f = first;
uint32_t s = second; uint32_t s = second;
@ -1168,16 +1095,17 @@ namespace etl
return (f | (s << 1)); return (f | (s << 1));
} }
inline int32_t binary_interleave(int16_t first, int16_t second) inline ETL_CONSTEXPR14 int32_t binary_interleave(int16_t first, int16_t second)
{ {
return int32_t(binary_interleave(uint16_t(first), uint16_t(second))); return int32_t(binary_interleave(uint16_t(first), uint16_t(second)));
} }
#if !defined(ETL_NO_64BIT_TYPES)
//***************************************************************************** //*****************************************************************************
/// Binary interleave /// Binary interleave
///\ingroup binary ///\ingroup binary
//***************************************************************************** //*****************************************************************************
inline uint64_t binary_interleave(uint32_t first, uint32_t second) inline ETL_CONSTEXPR14 uint64_t binary_interleave(uint32_t first, uint32_t second)
{ {
uint64_t f = first; uint64_t f = first;
uint64_t s = second; uint64_t s = second;
@ -1197,17 +1125,18 @@ namespace etl
return (f | (s << 1)); return (f | (s << 1));
} }
inline int64_t binary_interleave(int32_t first, int32_t second) inline ETL_CONSTEXPR14 int64_t binary_interleave(int32_t first, int32_t second)
{ {
return int64_t(binary_interleave(uint16_t(first), uint16_t(second))); return int64_t(binary_interleave(uint16_t(first), uint16_t(second)));
} }
#endif
//*************************************************************************** //***************************************************************************
/// Checks if odd. /// Checks if odd.
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename T> template <typename T>
typename etl::enable_if<etl::is_integral<T>::value, bool>::type ETL_CONSTEXPR typename etl::enable_if<etl::is_integral<T>::value, bool>::type
is_odd(const T value) is_odd(const T value)
{ {
return ((static_cast<typename etl::make_unsigned<T>::type>(value) & 1U) != 0U); return ((static_cast<typename etl::make_unsigned<T>::type>(value) & 1U) != 0U);
@ -1218,7 +1147,7 @@ namespace etl
///\ingroup binary ///\ingroup binary
//*************************************************************************** //***************************************************************************
template <typename T> template <typename T>
typename etl::enable_if<etl::is_integral<T>::value, bool>::type ETL_CONSTEXPR typename etl::enable_if<etl::is_integral<T>::value, bool>::type
is_even(const T value) is_even(const T value)
{ {
return ((static_cast<typename etl::make_unsigned<T>::type>(value) & 1U) == 0U); return ((static_cast<typename etl::make_unsigned<T>::type>(value) & 1U) == 0U);

View File

@ -186,6 +186,7 @@ namespace etl
return put_integral(static_cast<uint32_t>(value), width); return put_integral(static_cast<uint32_t>(value), width);
} }
#if !defined(ETL_NO_64BIT_TYPES)
//*************************************************************************** //***************************************************************************
/// For 64bit integral types /// For 64bit integral types
//*************************************************************************** //***************************************************************************
@ -201,6 +202,7 @@ namespace etl
{ {
return put_integral(value, width); return put_integral(value, width);
} }
#endif
//*************************************************************************** //***************************************************************************
/// For floating point types /// For floating point types
@ -396,6 +398,7 @@ namespace etl
return success; return success;
} }
#if !defined(ETL_NO_64BIT_TYPES)
//*************************************************************************** //***************************************************************************
/// For unsigned integral types. 64bit /// For unsigned integral types. 64bit
//*************************************************************************** //***************************************************************************
@ -428,6 +431,7 @@ namespace etl
return success; return success;
} }
#endif
//*************************************************************************** //***************************************************************************
/// Put a data chunk to the stream /// Put a data chunk to the stream

View File

@ -262,9 +262,9 @@ namespace etl
//*************************************************** //***************************************************
iterator() iterator()
: index(0), : index(0)
p_deque(0), , p_deque(0)
p_buffer(0) , p_buffer(0)
{ {
} }
@ -276,6 +276,16 @@ namespace etl
{ {
} }
//***************************************************
iterator& operator =(const iterator& other)
{
index = other.index;
p_deque = other.p_deque;
p_buffer = other.p_buffer;
return *this;
}
//*************************************************** //***************************************************
iterator& operator ++() iterator& operator ++()
{ {
@ -430,9 +440,9 @@ namespace etl
//*************************************************** //***************************************************
iterator(difference_type index_, ideque& the_deque, pointer p_buffer_) iterator(difference_type index_, ideque& the_deque, pointer p_buffer_)
: index(index_), : index(index_)
p_deque(&the_deque), , p_deque(&the_deque)
p_buffer(p_buffer_) , p_buffer(p_buffer_)
{ {
} }
@ -450,28 +460,47 @@ namespace etl
//*************************************************** //***************************************************
const_iterator() const_iterator()
: index(0), : index(0)
p_deque(0), , p_deque(0)
p_buffer(0) , p_buffer(0)
{ {
} }
//*************************************************** //***************************************************
const_iterator(const const_iterator& other) const_iterator(const const_iterator& other)
: index(other.index), : index(other.index)
p_deque(other.p_deque), , p_deque(other.p_deque)
p_buffer(other.p_buffer) , p_buffer(other.p_buffer)
{ {
} }
//*************************************************** //***************************************************
const_iterator(const typename ideque::iterator& other) const_iterator(const typename ideque::iterator& other)
: index(other.index), : index(other.index)
p_deque(other.p_deque), , p_deque(other.p_deque)
p_buffer(other.p_buffer) , p_buffer(other.p_buffer)
{ {
} }
//***************************************************
const_iterator& operator =(const const_iterator& other)
{
index = other.index;
p_deque = other.p_deque;
p_buffer = other.p_buffer;
return *this;
}
const_iterator& operator =(const typename ideque::iterator& other)
{
index = other.index;
p_deque = other.p_deque;
p_buffer = other.p_buffer;
return *this;
}
//*************************************************** //***************************************************
const_iterator& operator ++() const_iterator& operator ++()
{ {
@ -625,9 +654,9 @@ namespace etl
//*************************************************** //***************************************************
const_iterator(difference_type index_, ideque& the_deque, pointer p_buffer_) const_iterator(difference_type index_, ideque& the_deque, pointer p_buffer_)
: index(index_), : index(index_)
p_deque(&the_deque), , p_deque(&the_deque)
p_buffer(p_buffer_) , p_buffer(p_buffer_)
{ {
} }

View File

@ -135,6 +135,7 @@ namespace etl
} }
} }
#if !defined(ETL_NO_64BIT_TYPES)
//*************************************************************************** //***************************************************************************
inline uint64_t ntoh(const uint64_t network) inline uint64_t ntoh(const uint64_t network)
{ {
@ -147,6 +148,7 @@ namespace etl
return network; return network;
} }
} }
#endif
//*************************************************************************** //***************************************************************************
inline uint8_t hton(const uint8_t host) inline uint8_t hton(const uint8_t host)
@ -180,6 +182,7 @@ namespace etl
} }
} }
#if !defined(ETL_NO_64BIT_TYPES)
//*************************************************************************** //***************************************************************************
inline uint64_t hton(const uint64_t host) inline uint64_t hton(const uint64_t host)
{ {
@ -192,6 +195,7 @@ namespace etl
return host; return host;
} }
} }
#endif
} }
#endif #endif

View File

@ -49,6 +49,7 @@ SOFTWARE.
namespace etl namespace etl
{ {
#if !defined(ETL_NO_64BIT_TYPES)
//*************************************************************************** //***************************************************************************
/// fnv_1 policy. /// fnv_1 policy.
/// Calculates FNV1. /// Calculates FNV1.
@ -164,6 +165,7 @@ namespace etl
this->add(begin, end); this->add(begin, end);
} }
}; };
#endif
//*************************************************************************** //***************************************************************************
/// fnv_1 policy. /// fnv_1 policy.

View File

@ -72,6 +72,7 @@ namespace etl
return fnv_1a_32(begin, end); return fnv_1a_32(begin, end);
} }
#if !defined(ETL_NO_64BIT_TYPES)
//************************************************************************* //*************************************************************************
/// Hash to use when size_t is 64 bits. /// Hash to use when size_t is 64 bits.
/// T is always expected to be size_t. /// T is always expected to be size_t.
@ -82,6 +83,7 @@ namespace etl
{ {
return fnv_1a_64(begin, end); return fnv_1a_64(begin, end);
} }
#endif
} }
//*************************************************************************** //***************************************************************************

View File

@ -36,6 +36,13 @@ SOFTWARE.
#include "etl/char_traits.h" #include "etl/char_traits.h"
#include "etl/integral_limits.h" #include "etl/integral_limits.h"
#if defined(ETL_NO_STL) && defined(ETL_COMPILER_ARM5)
// Required for nan, nanf, nanl
#if !defined(__USE_C99_MATH)
#define __USE_C99_MATH
#endif
#endif
#include <limits.h> #include <limits.h>
#include <stdint.h> #include <stdint.h>
#include <float.h> #include <float.h>
@ -108,7 +115,7 @@ namespace etl
static const float_denorm_style has_denorm = denorm_indeterminate; static const float_denorm_style has_denorm = denorm_indeterminate;
static const float_round_style round_style = round_indeterminate; static const float_round_style round_style = round_indeterminate;
static const float round_error() { return float(0.5); } static float round_error() { return float(0.5); }
}; };
//*************************************************************************** //***************************************************************************
@ -137,15 +144,15 @@ namespace etl
static const bool is_signed = false; static const bool is_signed = false;
static const bool is_modulo = false; static const bool is_modulo = false;
static const bool min() { return false; } static bool min() { return false; }
static const bool max() { return true; } static bool max() { return true; }
static const bool lowest() { return false; } static bool lowest() { return false; }
static const bool epsilon() { return false; } static bool epsilon() { return false; }
static const bool round_error() { return false; } static bool round_error() { return false; }
static const bool denorm_min() { return false; } static bool denorm_min() { return false; }
static const bool infinity() { return false; } static bool infinity() { return false; }
static const bool quiet_NaN() { return false; } static bool quiet_NaN() { return false; }
static const bool signaling_NaN() { return false; } static bool signaling_NaN() { return false; }
}; };
//*************************************************************************** //***************************************************************************
@ -160,15 +167,15 @@ namespace etl
static const bool is_signed = etl::is_signed<char>::value; static const bool is_signed = etl::is_signed<char>::value;
static const bool is_modulo = false; static const bool is_modulo = false;
static const char min() { return char(CHAR_MIN); } static char min() { return char(CHAR_MIN); }
static const char max() { return char(CHAR_MAX); } static char max() { return char(CHAR_MAX); }
static const char lowest() { return char(CHAR_MIN); } static char lowest() { return char(CHAR_MIN); }
static const char epsilon() { return 0; } static char epsilon() { return 0; }
static const char round_error() { return 0; } static char round_error() { return 0; }
static const char denorm_min() { return 0; } static char denorm_min() { return 0; }
static const char infinity() { return 0; } static char infinity() { return 0; }
static const char quiet_NaN() { return 0; } static char quiet_NaN() { return 0; }
static const char signaling_NaN() { return 0; } static char signaling_NaN() { return 0; }
}; };
//*************************************************************************** //***************************************************************************
@ -183,15 +190,15 @@ namespace etl
static const bool is_signed = false; static const bool is_signed = false;
static const bool is_modulo = true; static const bool is_modulo = true;
static const unsigned char min() { return 0U; } static unsigned char min() { return 0U; }
static const unsigned char max() { return UCHAR_MAX; } static unsigned char max() { return UCHAR_MAX; }
static const unsigned char lowest() { return 0U; } static unsigned char lowest() { return 0U; }
static const unsigned char epsilon() { return 0U; } static unsigned char epsilon() { return 0U; }
static const unsigned char round_error() { return 0U; } static unsigned char round_error() { return 0U; }
static const unsigned char denorm_min() { return 0U; } static unsigned char denorm_min() { return 0U; }
static const unsigned char infinity() { return 0U; } static unsigned char infinity() { return 0U; }
static const unsigned char quiet_NaN() { return 0U; } static unsigned char quiet_NaN() { return 0U; }
static const unsigned char signaling_NaN() { return 0U; } static unsigned char signaling_NaN() { return 0U; }
}; };
//*************************************************************************** //***************************************************************************
@ -206,15 +213,15 @@ namespace etl
static const bool is_signed = true; static const bool is_signed = true;
static const bool is_modulo = false; static const bool is_modulo = false;
static const signed char min() { return SCHAR_MIN; } static signed char min() { return SCHAR_MIN; }
static const signed char max() { return SCHAR_MAX; } static signed char max() { return SCHAR_MAX; }
static const signed char lowest() { return SCHAR_MIN; } static signed char lowest() { return SCHAR_MIN; }
static const signed char epsilon() { return 0; } static signed char epsilon() { return 0; }
static const signed char round_error() { return 0; } static signed char round_error() { return 0; }
static const signed char denorm_min() { return 0; } static signed char denorm_min() { return 0; }
static const signed char infinity() { return 0; } static signed char infinity() { return 0; }
static const signed char quiet_NaN() { return 0; } static signed char quiet_NaN() { return 0; }
static const signed char signaling_NaN() { return 0; } static signed char signaling_NaN() { return 0; }
}; };
#if (ETL_NO_LARGE_CHAR_SUPPORT == false) #if (ETL_NO_LARGE_CHAR_SUPPORT == false)
@ -230,15 +237,15 @@ namespace etl
static const bool is_signed = false; static const bool is_signed = false;
static const bool is_modulo = true; static const bool is_modulo = true;
static const char16_t min() { return 0U; } static char16_t min() { return 0U; }
static const char16_t max() { return UINT_LEAST16_MAX; } static char16_t max() { return UINT_LEAST16_MAX; }
static const char16_t lowest() { return 0U; } static char16_t lowest() { return 0U; }
static const char16_t epsilon() { return 0U; } static char16_t epsilon() { return 0U; }
static const char16_t round_error() { return 0U; } static char16_t round_error() { return 0U; }
static const char16_t denorm_min() { return 0U; } static char16_t denorm_min() { return 0U; }
static const char16_t infinity() { return 0U; } static char16_t infinity() { return 0U; }
static const char16_t quiet_NaN() { return 0U; } static char16_t quiet_NaN() { return 0U; }
static const char16_t signaling_NaN() { return 0U; } static char16_t signaling_NaN() { return 0U; }
}; };
//*************************************************************************** //***************************************************************************
@ -253,15 +260,15 @@ namespace etl
static const bool is_signed = false; static const bool is_signed = false;
static const bool is_modulo = true; static const bool is_modulo = true;
static const char32_t min() { return 0U; } static char32_t min() { return 0U; }
static const char32_t max() { return UINT_LEAST32_MAX; } static char32_t max() { return UINT_LEAST32_MAX; }
static const char32_t lowest() { return 0U; } static char32_t lowest() { return 0U; }
static const char32_t epsilon() { return 0U; } static char32_t epsilon() { return 0U; }
static const char32_t round_error() { return 0U; } static char32_t round_error() { return 0U; }
static const char32_t denorm_min() { return 0U; } static char32_t denorm_min() { return 0U; }
static const char32_t infinity() { return 0U; } static char32_t infinity() { return 0U; }
static const char32_t quiet_NaN() { return 0U; } static char32_t quiet_NaN() { return 0U; }
static const char32_t signaling_NaN() { return 0U; } static char32_t signaling_NaN() { return 0U; }
}; };
#endif #endif
@ -278,15 +285,15 @@ namespace etl
static const bool is_signed = etl::is_signed<wchar_t>::value; static const bool is_signed = etl::is_signed<wchar_t>::value;
static const bool is_modulo = etl::is_unsigned<wchar_t>::value; static const bool is_modulo = etl::is_unsigned<wchar_t>::value;
static const wchar_t min() { return WCHAR_MIN; } static wchar_t min() { return WCHAR_MIN; }
static const wchar_t max() { return WCHAR_MAX; } static wchar_t max() { return WCHAR_MAX; }
static const wchar_t lowest() { return WCHAR_MIN; } static wchar_t lowest() { return WCHAR_MIN; }
static const wchar_t epsilon() { return wchar_t(0); } static wchar_t epsilon() { return wchar_t(0); }
static const wchar_t round_error() { return wchar_t(0); } static wchar_t round_error() { return wchar_t(0); }
static const wchar_t denorm_min() { return wchar_t(0); } static wchar_t denorm_min() { return wchar_t(0); }
static const wchar_t infinity() { return wchar_t(0); } static wchar_t infinity() { return wchar_t(0); }
static const wchar_t quiet_NaN() { return wchar_t(0); } static wchar_t quiet_NaN() { return wchar_t(0); }
static const wchar_t signaling_NaN() { return wchar_t(0); } static wchar_t signaling_NaN() { return wchar_t(0); }
}; };
//*************************************************************************** //***************************************************************************
@ -301,15 +308,15 @@ namespace etl
static const bool is_signed = true; static const bool is_signed = true;
static const bool is_modulo = false; static const bool is_modulo = false;
static const short min() { return SHRT_MIN; } static short min() { return SHRT_MIN; }
static const short max() { return SHRT_MAX; } static short max() { return SHRT_MAX; }
static const short lowest() { return SHRT_MIN; } static short lowest() { return SHRT_MIN; }
static const short epsilon() { return 0; } static short epsilon() { return 0; }
static const short round_error() { return 0; } static short round_error() { return 0; }
static const short denorm_min() { return 0; } static short denorm_min() { return 0; }
static const short infinity() { return 0; } static short infinity() { return 0; }
static const short quiet_NaN() { return 0; } static short quiet_NaN() { return 0; }
static const short signaling_NaN() { return 0; } static short signaling_NaN() { return 0; }
}; };
//*************************************************************************** //***************************************************************************
@ -324,15 +331,15 @@ namespace etl
static const bool is_signed = false; static const bool is_signed = false;
static const bool is_modulo = true; static const bool is_modulo = true;
static const unsigned short min() { return 0U; } static unsigned short min() { return 0U; }
static const unsigned short max() { return USHRT_MAX; } static unsigned short max() { return USHRT_MAX; }
static const unsigned short lowest() { return 0U; } static unsigned short lowest() { return 0U; }
static const unsigned short epsilon() { return 0U; } static unsigned short epsilon() { return 0U; }
static const unsigned short round_error() { return 0U; } static unsigned short round_error() { return 0U; }
static const unsigned short denorm_min() { return 0U; } static unsigned short denorm_min() { return 0U; }
static const unsigned short infinity() { return 0U; } static unsigned short infinity() { return 0U; }
static const unsigned short quiet_NaN() { return 0U; } static unsigned short quiet_NaN() { return 0U; }
static const unsigned short signaling_NaN() { return 0U; } static unsigned short signaling_NaN() { return 0U; }
}; };
@ -348,15 +355,15 @@ namespace etl
static const bool is_signed = true; static const bool is_signed = true;
static const bool is_modulo = false; static const bool is_modulo = false;
static const int min() { return INT_MIN; } static int min() { return INT_MIN; }
static const int max() { return INT_MAX; } static int max() { return INT_MAX; }
static const int lowest() { return INT_MIN; } static int lowest() { return INT_MIN; }
static const int epsilon() { return 0; } static int epsilon() { return 0; }
static const int round_error() { return 0; } static int round_error() { return 0; }
static const int denorm_min() { return 0; } static int denorm_min() { return 0; }
static const int infinity() { return 0; } static int infinity() { return 0; }
static const int quiet_NaN() { return 0; } static int quiet_NaN() { return 0; }
static const int signaling_NaN() { return 0; } static int signaling_NaN() { return 0; }
}; };
//*************************************************************************** //***************************************************************************
@ -371,15 +378,15 @@ namespace etl
static const bool is_signed = false; static const bool is_signed = false;
static const bool is_modulo = true; static const bool is_modulo = true;
static const unsigned int min() { return 0U; } static unsigned int min() { return 0U; }
static const unsigned int max() { return UINT_MAX; } static unsigned int max() { return UINT_MAX; }
static const unsigned int lowest() { return 0U; } static unsigned int lowest() { return 0U; }
static const unsigned int epsilon() { return 0U; } static unsigned int epsilon() { return 0U; }
static const unsigned int round_error() { return 0U; } static unsigned int round_error() { return 0U; }
static const unsigned int denorm_min() { return 0U; } static unsigned int denorm_min() { return 0U; }
static const unsigned int infinity() { return 0U; } static unsigned int infinity() { return 0U; }
static const unsigned int quiet_NaN() { return 0U; } static unsigned int quiet_NaN() { return 0U; }
static const unsigned int signaling_NaN() { return 0U; } static unsigned int signaling_NaN() { return 0U; }
}; };
//*************************************************************************** //***************************************************************************
@ -394,15 +401,15 @@ namespace etl
static const bool is_signed = true; static const bool is_signed = true;
static const bool is_modulo = false; static const bool is_modulo = false;
static const long min() { return LONG_MIN; } static long min() { return LONG_MIN; }
static const long max() { return LONG_MAX; } static long max() { return LONG_MAX; }
static const long lowest() { return LONG_MIN; } static long lowest() { return LONG_MIN; }
static const long epsilon() { return 0; } static long epsilon() { return 0; }
static const long round_error() { return 0; } static long round_error() { return 0; }
static const long denorm_min() { return 0; } static long denorm_min() { return 0; }
static const long infinity() { return 0; } static long infinity() { return 0; }
static const long quiet_NaN() { return 0; } static long quiet_NaN() { return 0; }
static const long signaling_NaN() { return 0; } static long signaling_NaN() { return 0; }
}; };
//*************************************************************************** //***************************************************************************
@ -417,15 +424,15 @@ namespace etl
static const bool is_signed = false; static const bool is_signed = false;
static const bool is_modulo = true; static const bool is_modulo = true;
static const unsigned long min() { return 0U; } static unsigned long min() { return 0U; }
static const unsigned long max() { return ULONG_MAX; } static unsigned long max() { return ULONG_MAX; }
static const unsigned long lowest() { return 0U; } static unsigned long lowest() { return 0U; }
static const unsigned long epsilon() { return 0U; } static unsigned long epsilon() { return 0U; }
static const unsigned long round_error() { return 0U; } static unsigned long round_error() { return 0U; }
static const unsigned long denorm_min() { return 0U; } static unsigned long denorm_min() { return 0U; }
static const unsigned long infinity() { return 0U; } static unsigned long infinity() { return 0U; }
static const unsigned long quiet_NaN() { return 0U; } static unsigned long quiet_NaN() { return 0U; }
static const unsigned long signaling_NaN() { return 0U; } static unsigned long signaling_NaN() { return 0U; }
}; };
//*************************************************************************** //***************************************************************************
@ -440,15 +447,15 @@ namespace etl
static const bool is_signed = true; static const bool is_signed = true;
static const bool is_modulo = false; static const bool is_modulo = false;
static const long long min() { return LLONG_MIN; } static long long min() { return LLONG_MIN; }
static const long long max() { return LLONG_MAX; } static long long max() { return LLONG_MAX; }
static const long long lowest() { return LLONG_MIN; } static long long lowest() { return LLONG_MIN; }
static const long long epsilon() { return 0; } static long long epsilon() { return 0; }
static const long long round_error() { return 0; } static long long round_error() { return 0; }
static const long long denorm_min() { return 0; } static long long denorm_min() { return 0; }
static const long long infinity() { return 0; } static long long infinity() { return 0; }
static const long long quiet_NaN() { return 0; } static long long quiet_NaN() { return 0; }
static const long long signaling_NaN() { return 0; } static long long signaling_NaN() { return 0; }
}; };
//*************************************************************************** //***************************************************************************
@ -463,15 +470,15 @@ namespace etl
static const bool is_signed = false; static const bool is_signed = false;
static const bool is_modulo = true; static const bool is_modulo = true;
static const unsigned long long min() { return 0U; } static unsigned long long min() { return 0U; }
static const unsigned long long max() { return ULLONG_MAX; } static unsigned long long max() { return ULLONG_MAX; }
static const unsigned long long lowest() { return 0U; } static unsigned long long lowest() { return 0U; }
static const unsigned long long epsilon() { return 0U; } static unsigned long long epsilon() { return 0U; }
static const unsigned long long round_error() { return 0U; } static unsigned long long round_error() { return 0U; }
static const unsigned long long denorm_min() { return 0U; } static unsigned long long denorm_min() { return 0U; }
static const unsigned long long infinity() { return 0U; } static unsigned long long infinity() { return 0U; }
static const unsigned long long quiet_NaN() { return 0U; } static unsigned long long quiet_NaN() { return 0U; }
static const unsigned long long signaling_NaN() { return 0U; } static unsigned long long signaling_NaN() { return 0U; }
}; };
//*************************************************************************** //***************************************************************************
@ -481,14 +488,14 @@ namespace etl
{ {
public: public:
static const float min() { return FLT_MIN; } static float min() { return FLT_MIN; }
static const float max() { return FLT_MAX; } static float max() { return FLT_MAX; }
static const float lowest() { return -FLT_MAX; } static float lowest() { return -FLT_MAX; }
static const float epsilon() { return FLT_EPSILON; } static float epsilon() { return FLT_EPSILON; }
static const float denorm_min() { return FLT_MIN; } static float denorm_min() { return FLT_MIN; }
static const float infinity() { return HUGE_VALF; } static float infinity() { return HUGE_VALF; }
static const float quiet_NaN() { return nanf(""); } static float quiet_NaN() { return nanf(""); }
static const float signaling_NaN() { return nanf(""); } static float signaling_NaN() { return nanf(""); }
static const int digits = FLT_MANT_DIG; static const int digits = FLT_MANT_DIG;
static const int digits10 = FLT_DIG; static const int digits10 = FLT_DIG;
@ -507,14 +514,14 @@ namespace etl
{ {
public: public:
static const double min() { return DBL_MIN; } static double min() { return DBL_MIN; }
static const double max() { return DBL_MAX; } static double max() { return DBL_MAX; }
static const double lowest() { return -DBL_MAX; } static double lowest() { return -DBL_MAX; }
static const double epsilon() { return DBL_EPSILON; } static double epsilon() { return DBL_EPSILON; }
static const double denorm_min() { return DBL_MIN; } static double denorm_min() { return DBL_MIN; }
static const double infinity() { return HUGE_VAL; } static double infinity() { return HUGE_VAL; }
static const double quiet_NaN() { return nan(""); } static double quiet_NaN() { return nan(""); }
static const double signaling_NaN() { return nan(""); } static double signaling_NaN() { return nan(""); }
static const int digits = DBL_MANT_DIG; static const int digits = DBL_MANT_DIG;
static const int digits10 = DBL_DIG; static const int digits10 = DBL_DIG;
@ -533,14 +540,14 @@ namespace etl
{ {
public: public:
static const long double min() { return LDBL_MIN; } static long double min() { return LDBL_MIN; }
static const long double max() { return LDBL_MAX; } static long double max() { return LDBL_MAX; }
static const long double lowest() { return -LDBL_MAX; } static long double lowest() { return -LDBL_MAX; }
static const long double epsilon() { return LDBL_EPSILON; } static long double epsilon() { return LDBL_EPSILON; }
static const long double denorm_min() { return LDBL_MIN; } static long double denorm_min() { return LDBL_MIN; }
static const long double infinity() { return HUGE_VALL; } static long double infinity() { return HUGE_VALL; }
static const long double quiet_NaN() { return nanl(""); } static long double quiet_NaN() { return nanl(""); }
static const long double signaling_NaN() { return nanl(""); } static long double signaling_NaN() { return nanl(""); }
static const int digits = LDBL_MANT_DIG; static const int digits = LDBL_MANT_DIG;

View File

@ -57,7 +57,11 @@ namespace etl
{ {
public: public:
#if defined(ETL_NO_64BIT_TYPES)
ETL_STATIC_ASSERT((etl::is_same<THash, uint32_t>::value), "Only 32 bit types supported");
#else
ETL_STATIC_ASSERT((etl::is_same<THash, uint32_t>::value || etl::is_same<THash, uint64_t>::value), "Only 32 & 64 bit types supported"); ETL_STATIC_ASSERT((etl::is_same<THash, uint32_t>::value || etl::is_same<THash, uint64_t>::value), "Only 32 & 64 bit types supported");
#endif
typedef THash value_type; typedef THash value_type;

View File

@ -73,7 +73,7 @@ namespace std
/// A null pointer. /// A null pointer.
///\ingroup nullptr ///\ingroup nullptr
//***************************************************************************** //*****************************************************************************
#if !defined(ETL_STLPORT) && (defined(ETL_COMPILER_ARM5) && (__cplusplus < 201103L)) #if !defined(ETL_STLPORT)
const std::nullptr_t nullptr = {}; const std::nullptr_t nullptr = {};
#endif #endif

View File

@ -43,6 +43,15 @@ SOFTWARE.
namespace etl namespace etl
{ {
namespace private_power
{
#if defined(ETL_NO_64BIT_TYPES)
typedef uint32_t type;
#else
typedef uint64_t type;
#endif
}
//*************************************************************************** //***************************************************************************
///\ingroup power ///\ingroup power
/// Calculates powers. /// Calculates powers.
@ -51,7 +60,7 @@ namespace etl
template <const size_t NV, const size_t POWER> template <const size_t NV, const size_t POWER>
struct power struct power
{ {
static const uint64_t value = NV * power<NV, POWER - 1>::value; static const private_power::type value = NV * power<NV, POWER - 1>::value;
}; };
//*************************************************************************** //***************************************************************************
@ -62,7 +71,7 @@ namespace etl
template <const size_t NV> template <const size_t NV>
struct power<NV, 0> struct power<NV, 0>
{ {
static const uint64_t value = 1; static const private_power::type value = 1;
}; };
//*************************************************************************** //***************************************************************************

View File

@ -50,6 +50,12 @@ namespace etl
{ {
namespace private_to_string namespace private_to_string
{ {
#if defined(ETL_NO_64BIT_TYPES)
typedef int32_t workspace_t;
#else
typedef int64_t workspace_t;
#endif
//*************************************************************************** //***************************************************************************
/// Helper function for left/right alignment. /// Helper function for left/right alignment.
//*************************************************************************** //***************************************************************************
@ -198,8 +204,8 @@ namespace etl
/// Helper function for floating point integral and fractional. /// Helper function for floating point integral and fractional.
//*************************************************************************** //***************************************************************************
template <typename TIString> template <typename TIString>
void add_integral_fractional(const int64_t integral, void add_integral_fractional(const workspace_t integral,
const int64_t fractional, const workspace_t fractional,
TIString& str, TIString& str,
const etl::basic_format_spec<TIString>& integral_format, const etl::basic_format_spec<TIString>& integral_format,
const etl::basic_format_spec<TIString>& fractional_format) const etl::basic_format_spec<TIString>& fractional_format)
@ -249,7 +255,7 @@ namespace etl
etl::basic_format_spec<TIString> fractional_format = integral_format; etl::basic_format_spec<TIString> fractional_format = integral_format;
fractional_format.width(integral_format.get_precision()).fill(type('0')).right(); fractional_format.width(integral_format.get_precision()).fill(type('0')).right();
int64_t multiplier = 1; workspace_t multiplier = 1;
for (uint32_t i = 0; i < fractional_format.get_precision(); ++i) for (uint32_t i = 0; i < fractional_format.get_precision(); ++i)
{ {
@ -258,10 +264,10 @@ namespace etl
// Find the integral part of the floating point // Find the integral part of the floating point
T f_integral = (value < T(0.0) ? ceil(value) : floor(value)); T f_integral = (value < T(0.0) ? ceil(value) : floor(value));
int64_t integral = static_cast<int64_t>(f_integral); workspace_t integral = static_cast<workspace_t>(f_integral);
// Find the fractional part of the floating point. // Find the fractional part of the floating point.
int64_t fractional = etl::absolute(static_cast<int64_t>(round((value - f_integral) * multiplier))); workspace_t fractional = etl::absolute(static_cast<workspace_t>(round((value - f_integral) * multiplier)));
// Check for a rounding carry to the integral. // Check for a rounding carry to the integral.
if (fractional == multiplier) if (fractional == multiplier)
@ -350,6 +356,67 @@ namespace etl
return str; return str;
} }
#if defined(ETL_NO_64BIT_TYPES)
//***************************************************************************
/// For signed integrals less than 64 bits. Default format spec.
//***************************************************************************
template <typename T, typename TIString>
typename etl::enable_if<etl::is_integral<T>::value &&
etl::is_signed<T>::value &&
!etl::is_same<T, bool>::value>::value, const TIString& > ::type
to_string(const T value, TIString& str, const bool append = false)
{
etl::basic_format_spec<TIString> format;
etl::private_to_string::add_integral(int32_t(value), str, format, append);
return str;
}
//***************************************************************************
/// For signed integrals less than 64 bits. Supplied format spec.
//***************************************************************************
template <typename T, typename TIString>
typename etl::enable_if<etl::is_integral<T>::value &&
etl::is_signed<T>::value &&
!etl::is_same<T, bool>::value>::value, const TIString& > ::type
to_string(const T value, TIString& str, const etl::basic_format_spec<TIString>& format, const bool append = false)
{
etl::private_to_string::add_integral(int32_t(value), str, format, append);
return str;
}
//***************************************************************************
/// For unsigned integrals less than 64 bits. Default format spec.
//***************************************************************************
template <typename T, typename TIString>
typename etl::enable_if<etl::is_integral<T>::value &&
etl::is_unsigned<T>::value &&
!etl::is_same<T, bool>::value>::value, const TIString& > ::type
to_string(const T value, TIString& str, const bool append = false)
{
etl::basic_format_spec<TIString> format;
etl::private_to_string::add_integral(uint32_t(value), str, format, append);
return str;
}
//***************************************************************************
/// For unsigned integrals less than 64 bits. Supplied format spec.
//***************************************************************************
template <typename T, typename TIString>
typename etl::enable_if<etl::is_integral<T>::value &&
etl::is_unsigned<T>::value &&
!etl::is_same<T, bool>::value>::value, const TIString& > ::type
to_string(const T value, TIString& str, const etl::basic_format_spec<TIString>& format, const bool append = false)
{
etl::private_to_string::add_integral(uint32_t(value), str, format, append);
return str;
}
#else
//*************************************************************************** //***************************************************************************
/// For signed integrals less than 64 bits. Default format spec. /// For signed integrals less than 64 bits. Default format spec.
//*************************************************************************** //***************************************************************************
@ -358,7 +425,7 @@ namespace etl
etl::is_signed<T>::value && etl::is_signed<T>::value &&
!etl::is_same<T, bool>::value && !etl::is_same<T, bool>::value &&
!etl::is_same<T, int64_t>::value, const TIString&>::type !etl::is_same<T, int64_t>::value, const TIString&>::type
to_string(const T value, TIString& str, const bool append = false) to_string(const T value, TIString& str, const bool append = false)
{ {
etl::basic_format_spec<TIString> format; etl::basic_format_spec<TIString> format;
@ -383,7 +450,7 @@ namespace etl
} }
//*************************************************************************** //***************************************************************************
/// For unsigned integrals less then 64 bits. Default format spec. /// For unsigned integrals less than 64 bits. Default format spec.
//*************************************************************************** //***************************************************************************
template <typename T, typename TIString> template <typename T, typename TIString>
typename etl::enable_if<etl::is_integral<T>::value && typename etl::enable_if<etl::is_integral<T>::value &&
@ -477,6 +544,7 @@ namespace etl
return str; return str;
} }
#endif
//*************************************************************************** //***************************************************************************
/// For floating point. Default format spec. /// For floating point. Default format spec.

View File

@ -450,6 +450,7 @@ namespace etl
uint32_t value2; uint32_t value2;
}; };
#if !defined(ETL_NO_64BIT_TYPES)
//*************************************************************************** //***************************************************************************
/// A 32 bit random number generator. /// A 32 bit random number generator.
/// Uses a permuted congruential generator calculation. /// Uses a permuted congruential generator calculation.
@ -518,6 +519,7 @@ namespace etl
uint64_t value; uint64_t value;
}; };
#endif
#if ETL_8BIT_SUPPORT #if ETL_8BIT_SUPPORT
//*************************************************************************** //***************************************************************************

View File

@ -40,9 +40,10 @@ SOFTWARE.
#include "integral_limits.h" #include "integral_limits.h"
#include "hash.h" #include "hash.h"
#include "basic_string.h" #include "basic_string.h"
#include "algorithm.h" #include "algorithm.h"
#include "stdint.h"
///\defgroup array array ///\defgroup array array
/// A wrapper for arrays /// A wrapper for arrays
///\ingroup containers ///\ingroup containers
@ -120,8 +121,8 @@ namespace etl
/// Default constructor. /// Default constructor.
//************************************************************************* //*************************************************************************
ETL_CONSTEXPR17 basic_string_view() ETL_CONSTEXPR17 basic_string_view()
: mbegin(nullptr), : mbegin(nullptr)
mend(nullptr) , mend(nullptr)
{ {
} }
@ -129,8 +130,8 @@ namespace etl
/// Construct from string. /// Construct from string.
//************************************************************************* //*************************************************************************
ETL_CONSTEXPR17 basic_string_view(const etl::ibasic_string<T>& str) ETL_CONSTEXPR17 basic_string_view(const etl::ibasic_string<T>& str)
: mbegin(str.begin()), : mbegin(str.begin())
mend(str.end()) , mend(str.end())
{ {
} }
@ -138,8 +139,8 @@ namespace etl
/// Construct from T*. /// Construct from T*.
//************************************************************************* //*************************************************************************
ETL_EXPLICIT_STRING_FROM_CHAR ETL_CONSTEXPR17 basic_string_view(const T* begin_) ETL_EXPLICIT_STRING_FROM_CHAR ETL_CONSTEXPR17 basic_string_view(const T* begin_)
: mbegin(begin_), : mbegin(begin_)
mend(begin_ + TTraits::length(begin_)) , mend(begin_ + TTraits::length(begin_))
{ {
} }
@ -147,18 +148,17 @@ namespace etl
/// Construct from pointer range. /// Construct from pointer range.
//************************************************************************* //*************************************************************************
ETL_CONSTEXPR17 basic_string_view(const T* begin_, const T* end_) ETL_CONSTEXPR17 basic_string_view(const T* begin_, const T* end_)
: mbegin(begin_), : mbegin(begin_)
mend(end_) , mend(end_)
{ {
} }
//************************************************************************* //*************************************************************************
/// Construct from iterator/size. /// Construct from iterator/size.
//************************************************************************* //*************************************************************************
template <typename TSize, typename TDummy = typename etl::enable_if<etl::is_integral<TSize>::value, void>::type> ETL_CONSTEXPR17 basic_string_view(const T* begin_, size_t size_)
ETL_CONSTEXPR17 basic_string_view(const T* begin_, TSize size_) : mbegin(begin_)
: mbegin(begin_), , mend(begin_ + size_)
mend(begin_ + size_)
{ {
} }
@ -166,8 +166,8 @@ namespace etl
/// Copy constructor /// Copy constructor
//************************************************************************* //*************************************************************************
ETL_CONSTEXPR17 basic_string_view(const basic_string_view& other) ETL_CONSTEXPR17 basic_string_view(const basic_string_view& other)
: mbegin(other.mbegin), : mbegin(other.mbegin)
mend(other.mend) , mend(other.mend)
{ {
} }
@ -301,31 +301,28 @@ namespace etl
etl::basic_string_view<T, TTraits>& operator=(const etl::basic_string_view<T, TTraits>& other) etl::basic_string_view<T, TTraits>& operator=(const etl::basic_string_view<T, TTraits>& other)
{ {
mbegin = other.mbegin; mbegin = other.mbegin;
mend = other.mend; mend = other.mend;
return *this; return *this;
} }
//************************************************************************* //*************************************************************************
/// Assign from iterators /// Assign from iterators
//************************************************************************* //*************************************************************************
template <typename TIterator, template <typename TIterator>
typename TDummy = typename etl::enable_if<etl::is_random_iterator<TIterator>::value, void>::type> void assign(TIterator begin_, TIterator end_)
void assign(TIterator begin_, TIterator end_)
{ {
mbegin = etl::addressof(*begin_); mbegin = etl::addressof(*begin_);
mend = etl::addressof(*begin_) + etl::distance(begin_, end_); mend = etl::addressof(*begin_) + etl::distance(begin_, end_);
} }
//************************************************************************* //*************************************************************************
/// Assign from iterator and size. /// Assign from iterator and size.
//************************************************************************* //*************************************************************************
template <typename TIterator, template <typename TIterator>
typename TSize, void assign(TIterator begin_, size_t size_)
typename TDummy = typename etl::enable_if<etl::is_integral<TSize>::value, void>::type>
void assign(TIterator begin_, TSize size_)
{ {
mbegin = etl::addressof(*begin_); mbegin = etl::addressof(*begin_);
mend = etl::addressof(*begin_) + size_; mend = etl::addressof(*begin_) + size_;
} }
//************************************************************************* //*************************************************************************

View File

@ -37,8 +37,8 @@ SOFTWARE.
/// Definitions of the ETL version /// Definitions of the ETL version
///\ingroup utilities ///\ingroup utilities
#define ETL_VERSION_MAJOR 16 #define ETL_VERSION_MAJOR 17
#define ETL_VERSION_MINOR 8 #define ETL_VERSION_MINOR 0
#define ETL_VERSION_PATCH 0 #define ETL_VERSION_PATCH 0
#define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) "." ETL_STRINGIFY(ETL_VERSION_MINOR) "." ETL_STRINGIFY(ETL_VERSION_PATCH) #define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) "." ETL_STRINGIFY(ETL_VERSION_MINOR) "." ETL_STRINGIFY(ETL_VERSION_PATCH)
#define ETL_VERSION_W ETL_STRINGIFY(ETL_VERSION_MAJOR) L"." ETL_STRINGIFY(ETL_VERSION_MINOR) L"." ETL_STRINGIFY(ETL_VERSION_PATCH) #define ETL_VERSION_W ETL_STRINGIFY(ETL_VERSION_MAJOR) L"." ETL_STRINGIFY(ETL_VERSION_MINOR) L"." ETL_STRINGIFY(ETL_VERSION_PATCH)

View File

@ -1,6 +1,6 @@
{ {
"name": "Embedded Template Library", "name": "Embedded Template Library",
"version": "16.8.0", "version": "17.0.0",
"authors": { "authors": {
"name": "John Wellbelove", "name": "John Wellbelove",
"email": "john.wellbelove@etlcpp.com" "email": "john.wellbelove@etlcpp.com"

View File

@ -1,5 +1,5 @@
name=Embedded Template Library name=Embedded Template Library
version=16.8.0 version=17.0.0
author= John Wellbelove <john.wellbelove@etlcpp.com> author= John Wellbelove <john.wellbelove@etlcpp.com>
maintainer=John Wellbelove <john.wellbelove@etlcpp.com> maintainer=John Wellbelove <john.wellbelove@etlcpp.com>
license=MIT license=MIT

View File

@ -1,6 +1,28 @@
===============================================================================
17.0.0
Recoded binary_fill, has_zero_byte and has_byte_n as runtime functions to fix
compiler compatibilty issues. All functions may be constexpr if the compiler supports it.
Added tests for binary constextr functions.
Added option to define ETL_NO_64BIT_TYPES macro if the compiler does not support 64bit types.
Conditional compilation macros added to affected files.
Added iterator copy constructors to etl::deque.
Added code for ARM5 compiler compatibility in limits.h
Simplified conditional compilation for nullptr definition.
Compiler compatibility changes to assign() in etl::string_view
===============================================================================
16.8.1
Fixed C++03 compatibility issues nullptr.h, binary.h & string_view.h
Fixed warning
=============================================================================== ===============================================================================
16.8.0 16.8.0
Extracted message_packet from etl::message_router for use as an independant class. Extracted message_packet from etl::message_router for use as an independent class.
=============================================================================== ===============================================================================
16.7.1 16.7.1

View File

@ -63,10 +63,12 @@ FORCE_INLINE uint32_t getblock32(const uint32_t * p, int i)
return p[i]; return p[i];
} }
#if !defined(ETL_NO_64BIT_TYPES)
FORCE_INLINE uint64_t getblock64(const uint64_t * p, int i) FORCE_INLINE uint64_t getblock64(const uint64_t * p, int i)
{ {
return p[i]; return p[i];
} }
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Finalization mix - force all bits of a hash block to avalanche // Finalization mix - force all bits of a hash block to avalanche
@ -84,6 +86,7 @@ FORCE_INLINE uint32_t fmix32(uint32_t h)
//---------- //----------
#if !defined(ETL_NO_64BIT_TYPES)
FORCE_INLINE uint64_t fmix64(uint64_t k) FORCE_INLINE uint64_t fmix64(uint64_t k)
{ {
k ^= k >> 33; k ^= k >> 33;
@ -94,6 +97,7 @@ FORCE_INLINE uint64_t fmix64(uint64_t k)
return k; return k;
} }
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -257,6 +261,7 @@ void MurmurHash3_x86_128(const void * key, const int len,
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#if !defined(ETL_NO_64BIT_TYPES)
void MurmurHash3_x64_128(const void * key, const int len, void MurmurHash3_x64_128(const void * key, const int len,
const uint32_t seed, void * out) const uint32_t seed, void * out)
{ {
@ -335,4 +340,4 @@ void MurmurHash3_x64_128(const void * key, const int len,
((uint64_t*)out)[0] = h1; ((uint64_t*)out)[0] = h1;
((uint64_t*)out)[1] = h2; ((uint64_t*)out)[1] = h2;
} }
#endif

View File

@ -16,7 +16,9 @@
typedef unsigned char uint8_t; typedef unsigned char uint8_t;
typedef unsigned int uint32_t; typedef unsigned int uint32_t;
#if !defined(ETL_NO_64BIT_TYPES)
typedef unsigned __int64 uint64_t; typedef unsigned __int64 uint64_t;
#endif
// Other compilers // Other compilers

View File

@ -172,6 +172,14 @@ namespace
CHECK_EQUAL(0x6F, int(value)); CHECK_EQUAL(0x6F, int(value));
} }
//*************************************************************************
TEST(test_rotate_left8_constexpr)
{
char temp[etl::rotate_left(uint8_t(0xAA))];
CHECK_EQUAL(etl::rotate_left(uint8_t(0xAA)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_rotate_left16) TEST(test_rotate_left16)
{ {
@ -262,6 +270,14 @@ namespace
CHECK_EQUAL(0x6E79, int(value)); CHECK_EQUAL(0x6E79, int(value));
} }
//*************************************************************************
TEST(test_rotate_left16_constexpr)
{
char temp[etl::rotate_left(uint16_t(0xAA))];
CHECK_EQUAL(etl::rotate_left(uint16_t(0xAA)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_rotate_right8) TEST(test_rotate_right8)
{ {
@ -316,6 +332,14 @@ namespace
CHECK_EQUAL(0xDB, int(value)); CHECK_EQUAL(0xDB, int(value));
} }
//*************************************************************************
TEST(test_rotate_right8_constexpr)
{
char temp[etl::rotate_right(uint8_t(0xAA))];
CHECK_EQUAL(etl::rotate_right(uint8_t(0xAA)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_rotate_right16) TEST(test_rotate_right16)
{ {
@ -406,6 +430,14 @@ namespace
CHECK_EQUAL(0x5B9E, int(value)); CHECK_EQUAL(0x5B9E, int(value));
} }
//*************************************************************************
TEST(test_rotate_right16_constexpr)
{
char temp[etl::rotate_right(uint16_t(0xAA))];
CHECK_EQUAL(etl::rotate_right(uint16_t(0xAA)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_rotate16) TEST(test_rotate16)
{ {
@ -423,6 +455,14 @@ namespace
CHECK_EQUAL(0xCB73, int(value)); CHECK_EQUAL(0xCB73, int(value));
} }
//*************************************************************************
TEST(test_rotate16_constexpr)
{
char temp[etl::rotate(uint16_t(0xAA), 1)];
CHECK_EQUAL(etl::rotate(uint16_t(0xAA), 1), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_reverse_bits8) TEST(test_reverse_bits8)
{ {
@ -453,6 +493,14 @@ namespace
CHECK_EQUAL(0x35, int(value)); CHECK_EQUAL(0x35, int(value));
} }
//*************************************************************************
TEST(test_reverse_bits8_constexpr)
{
char temp[etl::reverse_bits(uint8_t(0xA5))];
CHECK_EQUAL(etl::reverse_bits(uint8_t(0xA5)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_reverse_bits16) TEST(test_reverse_bits16)
{ {
@ -471,6 +519,14 @@ namespace
CHECK_EQUAL(0xA5A5, value); CHECK_EQUAL(0xA5A5, value);
} }
//*************************************************************************
TEST(test_reverse_bits16_constexpr)
{
char temp[etl::reverse_bits(uint16_t(0xA500))];
CHECK_EQUAL(etl::reverse_bits(uint16_t(0xA500)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_reverse_bits32) TEST(test_reverse_bits32)
{ {
@ -489,6 +545,14 @@ namespace
CHECK_EQUAL(uint32_t(0x5A5A5A5A), value); CHECK_EQUAL(uint32_t(0x5A5A5A5A), value);
} }
//*************************************************************************
TEST(test_reverse_bits32_constexpr)
{
char temp[etl::reverse_bits(uint32_t(0xA5000000))];
CHECK_EQUAL(etl::reverse_bits(uint32_t(0xA5000000)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_reverse_bits64) TEST(test_reverse_bits64)
{ {
@ -507,6 +571,14 @@ namespace
CHECK_EQUAL(uint64_t(0x5A5A5A5A5A5A5A5A), value); CHECK_EQUAL(uint64_t(0x5A5A5A5A5A5A5A5A), value);
} }
//*************************************************************************
TEST(test_reverse_bits64_constexpr)
{
char temp[etl::reverse_bits(uint64_t(0xA500000000000000))];
CHECK_EQUAL(etl::reverse_bits(uint64_t(0xA500000000000000)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_reverse_bytes16) TEST(test_reverse_bytes16)
{ {
@ -525,6 +597,14 @@ namespace
CHECK_EQUAL(0x5AA5, value); CHECK_EQUAL(0x5AA5, value);
} }
//*************************************************************************
TEST(test_reverse_bytes16_constexpr)
{
char temp[etl::reverse_bytes(uint16_t(0xA500))];
CHECK_EQUAL(etl::reverse_bytes(uint16_t(0xA500)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_reverse_bytes32) TEST(test_reverse_bytes32)
{ {
@ -543,6 +623,14 @@ namespace
CHECK_EQUAL(0xA5A55A5AU, value); CHECK_EQUAL(0xA5A55A5AU, value);
} }
//*************************************************************************
TEST(test_reverse_bytes32_constexpr)
{
char temp[etl::reverse_bytes(uint32_t(0xA5000000))];
CHECK_EQUAL(etl::reverse_bytes(uint32_t(0xA5000000)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_reverse_bytes64) TEST(test_reverse_bytes64)
{ {
@ -561,6 +649,14 @@ namespace
CHECK_EQUAL(0xA5A55A5AA5A55A5AU, value); CHECK_EQUAL(0xA5A55A5AA5A55A5AU, value);
} }
//*************************************************************************
TEST(test_reverse_bytes64_constexpr)
{
char temp[etl::reverse_bytes(uint64_t(0xA500000000000000))];
CHECK_EQUAL(etl::reverse_bytes(uint64_t(0xA500000000000000)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_binary_to_gray8) TEST(test_binary_to_gray8)
{ {
@ -579,6 +675,14 @@ namespace
} }
} }
//*************************************************************************
TEST(test_binary_to_gray8_constexpr)
{
char temp[etl::binary_to_gray(uint8_t(0xFF))];
CHECK_EQUAL(etl::binary_to_gray(uint8_t(0xFF)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_binary_to_gray16) TEST(test_binary_to_gray16)
{ {
@ -597,6 +701,14 @@ namespace
} }
} }
//*************************************************************************
TEST(test_binary_to_gray16_constexpr)
{
char temp[etl::binary_to_gray(uint16_t(0xFF))];
CHECK_EQUAL(etl::binary_to_gray(uint16_t(0xFF)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_binary_to_gray32) TEST(test_binary_to_gray32)
{ {
@ -621,6 +733,14 @@ namespace
} }
} }
//*************************************************************************
TEST(test_binary_to_gray32_constexpr)
{
char temp[etl::binary_to_gray(uint32_t(0xFF))];
CHECK_EQUAL(etl::binary_to_gray(uint32_t(0xFF)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_binary_to_gray64) TEST(test_binary_to_gray64)
{ {
@ -645,6 +765,19 @@ namespace
} }
} }
size_t xxx()
{
return 4;
}
//*************************************************************************
TEST(test_binary_to_gray64_constexpr)
{
char temp[etl::binary_to_gray(uint64_t(0xFF))];
CHECK_EQUAL(etl::binary_to_gray(uint64_t(0xFF)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_gray_to_binary8) TEST(test_gray_to_binary8)
{ {
@ -655,6 +788,14 @@ namespace
} }
} }
//*************************************************************************
TEST(test_gray_to_binary8_constexpr)
{
char temp[etl::gray_to_binary(uint8_t(0xFF))];
CHECK_EQUAL(etl::gray_to_binary(uint8_t(0xFF)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_gray_to_binary16) TEST(test_gray_to_binary16)
{ {
@ -665,6 +806,14 @@ namespace
} }
} }
//*************************************************************************
TEST(test_gray_to_binary16_constexpr)
{
char temp[etl::gray_to_binary(uint16_t(0xFF))];
CHECK_EQUAL(etl::gray_to_binary(uint16_t(0xFF)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_gray_to_binary32) TEST(test_gray_to_binary32)
{ {
@ -680,6 +829,14 @@ namespace
} }
} }
//*************************************************************************
TEST(test_gray_to_binary32_constexpr)
{
char temp[etl::gray_to_binary(uint32_t(0xFF))];
CHECK_EQUAL(etl::gray_to_binary(uint32_t(0xFF)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_gray_to_binary64) TEST(test_gray_to_binary64)
{ {
@ -695,6 +852,14 @@ namespace
} }
} }
//*************************************************************************
TEST(test_gray_to_binary64_constexpr)
{
char temp[etl::gray_to_binary(uint64_t(0xFF))];
CHECK_EQUAL(etl::gray_to_binary(uint64_t(0xFF)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_count_bits_8) TEST(test_count_bits_8)
{ {
@ -705,6 +870,14 @@ namespace
} }
} }
//*************************************************************************
TEST(test_count_bits_8_constexpr)
{
char temp[etl::count_bits(uint8_t(0xFF))];
CHECK_EQUAL(etl::count_bits(uint8_t(0xFF)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_count_bits_16) TEST(test_count_bits_16)
{ {
@ -715,6 +888,14 @@ namespace
} }
} }
//*************************************************************************
TEST(test_count_bits_16_constexpr)
{
char temp[etl::count_bits(uint16_t(0xFF))];
CHECK_EQUAL(etl::count_bits(uint16_t(0xFF)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_count_bits_32) TEST(test_count_bits_32)
{ {
@ -731,6 +912,14 @@ namespace
} }
} }
//*************************************************************************
TEST(test_count_bits_32_constexpr)
{
char temp[etl::count_bits(uint32_t(0xFF))];
CHECK_EQUAL(etl::count_bits(uint32_t(0xFF)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_count_bits_64) TEST(test_count_bits_64)
{ {
@ -747,6 +936,14 @@ namespace
} }
} }
//*************************************************************************
TEST(test_count_bits_64_constexpr)
{
char temp[etl::count_bits(uint64_t(0xFF))];
CHECK_EQUAL(etl::count_bits(uint64_t(0xFF)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_parity_8) TEST(test_parity_8)
{ {
@ -757,6 +954,14 @@ namespace
} }
} }
//*************************************************************************
TEST(test_parity_8_constexpr)
{
char temp[etl::parity(uint8_t(0xFE))];
CHECK_EQUAL(etl::parity(uint8_t(0xFE)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_parity_16) TEST(test_parity_16)
{ {
@ -767,6 +972,14 @@ namespace
} }
} }
//*************************************************************************
TEST(test_parity_16_constexpr)
{
char temp[etl::parity(uint16_t(0xFE))];
CHECK_EQUAL(etl::parity(uint16_t(0xFE)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_parity_32) TEST(test_parity_32)
{ {
@ -783,6 +996,14 @@ namespace
} }
} }
//*************************************************************************
TEST(test_parity_32_constexpr)
{
char temp[etl::parity(uint32_t(0xFE))];
CHECK_EQUAL(etl::parity(uint32_t(0xFE)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_parity_64) TEST(test_parity_64)
{ {
@ -799,6 +1020,14 @@ namespace
} }
} }
//*************************************************************************
TEST(test_parity_64_constexpr)
{
char temp[etl::parity(uint64_t(0xFE))];
CHECK_EQUAL(etl::parity(uint64_t(0xFE)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_fold_bits) TEST(test_fold_bits)
{ {
@ -869,6 +1098,14 @@ namespace
CHECK_EQUAL(test_fold_bits<uint64_t>(data, 63), (etl::fold_bits<uint64_t, 63>(data))); CHECK_EQUAL(test_fold_bits<uint64_t>(data, 63), (etl::fold_bits<uint64_t, 63>(data)));
} }
//*************************************************************************
TEST(test_fold_bits_constexpr)
{
char temp[etl::fold_bits<int64_t, 7>(0xE8C9AACCBC3D9A8F)];
CHECK_EQUAL((etl::fold_bits<int64_t, 7>(0xE8C9AACCBC3D9A8F)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_max_value_for_bits) TEST(test_max_value_for_bits)
{ {
@ -1053,6 +1290,14 @@ namespace
CHECK_EQUAL(178956970, (etl::sign_extend<int64_t, 30>(value32))); CHECK_EQUAL(178956970, (etl::sign_extend<int64_t, 30>(value32)));
} }
//*************************************************************************
TEST(test_sign_extend_template1_constexpr)
{
char temp[etl::sign_extend<int8_t, 6>(0x1A)];
CHECK_EQUAL((etl::sign_extend<int8_t, 6>(0x1A)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_sign_extend_template1b) TEST(test_sign_extend_template1b)
{ {
@ -1104,6 +1349,14 @@ namespace
CHECK_EQUAL(-22, (etl::sign_extend<int64_t, 6, 26>(value))); CHECK_EQUAL(-22, (etl::sign_extend<int64_t, 6, 26>(value)));
} }
//*************************************************************************
TEST(test_sign_extend_template1b_constexpr)
{
char temp[etl::sign_extend<int8_t, 6, 0>(0x1A)];
CHECK_EQUAL((etl::sign_extend<int8_t, 6, 0>(0x1A)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_sign_extend_template2) TEST(test_sign_extend_template2)
{ {
@ -1150,6 +1403,14 @@ namespace
CHECK_EQUAL(178956970, (etl::sign_extend<int64_t>(value32, 30))); CHECK_EQUAL(178956970, (etl::sign_extend<int64_t>(value32, 30)));
} }
//*************************************************************************
TEST(test_sign_extend_template2_constexpr)
{
char temp[etl::sign_extend<int8_t>(0x1A, 6)];
CHECK_EQUAL((etl::sign_extend<int8_t>(0x1A, 6)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_sign_extend_template2b) TEST(test_sign_extend_template2b)
{ {
@ -1201,6 +1462,14 @@ namespace
CHECK_EQUAL(-22, (etl::sign_extend<int64_t>(value, 6, 26))); CHECK_EQUAL(-22, (etl::sign_extend<int64_t>(value, 6, 26)));
} }
//*************************************************************************
TEST(test_sign_extend_template2b_constexpr)
{
char temp[etl::sign_extend<int8_t>(0x1A, 6, 0)];
CHECK_EQUAL((etl::sign_extend<int8_t>(0x1A, 6, 0)), sizeof(temp));
}
//************************************************************************* //*************************************************************************
TEST(test_bit) TEST(test_bit)
{ {
@ -1280,207 +1549,119 @@ namespace
} }
//************************************************************************* //*************************************************************************
TEST(test_binary_fill_compile_time) TEST(test_binary_fill)
{ {
CHECK_EQUAL(0x12U, (etl::binary_fill<uint8_t, uint8_t, 0x12>::value)); CHECK_EQUAL(0x12U, (etl::binary_fill<uint8_t>(uint8_t(0x12))));
CHECK_EQUAL(0x1212U, (etl::binary_fill<uint16_t, uint8_t, 0x12>::value)); CHECK_EQUAL(0x1212U, (etl::binary_fill<uint16_t>(uint8_t(0x12))));
CHECK_EQUAL(0x12121212U, (etl::binary_fill<uint32_t, uint8_t, 0x12>::value)); CHECK_EQUAL(0x12121212U, (etl::binary_fill<uint32_t>(uint8_t(0x12))));
CHECK_EQUAL(0x1212121212121212U, (etl::binary_fill<uint64_t, uint8_t, 0x12>::value)); CHECK_EQUAL(0x1212121212121212U, (etl::binary_fill<uint64_t>(uint8_t(0x12))));
CHECK_EQUAL(0x12, (etl::binary_fill<int8_t, int8_t, 0x12>::value)); CHECK_EQUAL(0x12, (etl::binary_fill<int8_t>(int8_t(0x12))));
CHECK_EQUAL(0x1212, (etl::binary_fill<int16_t, int8_t, 0x12>::value)); CHECK_EQUAL(0x1212, (etl::binary_fill<int16_t>(int8_t(0x12))));
CHECK_EQUAL(0x12121212, (etl::binary_fill<int32_t, int8_t, 0x12>::value)); CHECK_EQUAL(0x12121212, (etl::binary_fill<int32_t>(int8_t(0x12))));
CHECK_EQUAL(0x1212121212121212, (etl::binary_fill<int64_t, int8_t, 0x12>::value)); CHECK_EQUAL(0x1212121212121212, (etl::binary_fill<int64_t>(int8_t(0x12))));
CHECK_EQUAL(0x1234U, (etl::binary_fill<uint16_t, uint16_t, 0x1234>::value)); CHECK_EQUAL(0x1234U, (etl::binary_fill<uint16_t>(uint16_t(0x1234))));
CHECK_EQUAL(0x12341234U, (etl::binary_fill<uint32_t, uint16_t, 0x1234>::value)); CHECK_EQUAL(0x12341234U, (etl::binary_fill<uint32_t>(uint16_t(0x1234))));
CHECK_EQUAL(0x1234123412341234U, (etl::binary_fill<uint64_t, uint16_t, 0x1234>::value)); CHECK_EQUAL(0x1234123412341234U, (etl::binary_fill<uint64_t>(uint16_t(0x1234))));
CHECK_EQUAL(0x1234, (etl::binary_fill<int16_t, int16_t, 0x1234>::value)); CHECK_EQUAL(0x1234, (etl::binary_fill<int16_t>(int16_t(0x1234))));
CHECK_EQUAL(0x12341234, (etl::binary_fill<int32_t, int16_t, 0x1234>::value)); CHECK_EQUAL(0x12341234, (etl::binary_fill<int32_t>(int16_t(0x1234))));
CHECK_EQUAL(0x1234123412341234, (etl::binary_fill<int64_t, int16_t, 0x1234>::value)); CHECK_EQUAL(0x1234123412341234, (etl::binary_fill<int64_t>(int16_t(0x1234))));
CHECK_EQUAL(0x12345678U, (etl::binary_fill<uint32_t, uint32_t, 0x12345678>::value)); CHECK_EQUAL(0x12345678U, (etl::binary_fill<uint32_t>(uint32_t(0x12345678))));
CHECK_EQUAL(0x1234567812345678U, (etl::binary_fill<uint64_t, uint32_t, 0x12345678>::value)); CHECK_EQUAL(0x1234567812345678U, (etl::binary_fill<uint64_t>(uint32_t(0x12345678))));
CHECK_EQUAL(0x12345678, (etl::binary_fill<int32_t, int32_t, 0x12345678>::value)); CHECK_EQUAL(int32_t(0x12345678), int32_t(etl::binary_fill<uint32_t>(int32_t(0x12345678))));
CHECK_EQUAL(0x1234567812345678, (etl::binary_fill<int64_t, int32_t, 0x12345678>::value)); CHECK_EQUAL(int64_t(0x1234567812345678), int64_t(etl::binary_fill<int64_t>(uint32_t(0x12345678))));
CHECK_EQUAL(0x123456789ABCDEF0U, (etl::binary_fill<uint64_t, uint64_t, 0x123456789ABCDEF0>::value)); CHECK_EQUAL(0x123456789ABCDEF0U, (etl::binary_fill<uint64_t>(uint64_t(0x123456789ABCDEF0))));
CHECK_EQUAL(0x123456789ABCDEF0, (etl::binary_fill<int64_t, int64_t, 0x123456789ABCDEF0>::value)); CHECK_EQUAL(int64_t(0x123456789ABCDEF0), int64_t(etl::binary_fill<int64_t>(int64_t(0x123456789ABCDEF0))));
} }
//************************************************************************* //*************************************************************************
TEST(test_binary_fill_run_time) TEST(test_has_zero_byte)
{ {
CHECK_EQUAL(0x12U, (etl::binary_fill<uint8_t>::value<uint8_t>(0x12))); CHECK(!(etl::has_zero_byte(uint8_t(0x01))));
CHECK_EQUAL(0x1212U, (etl::binary_fill<uint16_t>::value<uint8_t>(0x12))); CHECK((etl::has_zero_byte(uint8_t(0x00))));
CHECK_EQUAL(0x12121212U, (etl::binary_fill<uint32_t>::value<uint8_t>(0x12)));
CHECK_EQUAL(0x1212121212121212U, (etl::binary_fill<uint64_t>::value<uint8_t>(0x12)));
CHECK_EQUAL(0x12, (etl::binary_fill<int8_t>::value<int8_t>(0x12))); CHECK(!(etl::has_zero_byte(int8_t(0x01))));
CHECK_EQUAL(0x1212, (etl::binary_fill<int16_t>::value<int8_t>(0x12))); CHECK((etl::has_zero_byte(int8_t(0x00))));
CHECK_EQUAL(0x12121212, (etl::binary_fill<int32_t>::value<int8_t>(0x12)));
CHECK_EQUAL(0x1212121212121212, (etl::binary_fill<int64_t>::value<int8_t>(0x12)));
CHECK_EQUAL(0x1234U, (etl::binary_fill<uint16_t>::value<uint16_t>(0x1234))); CHECK(!(etl::has_zero_byte(uint16_t(0x0123))));
CHECK_EQUAL(0x12341234U, (etl::binary_fill<uint32_t>::value<uint16_t>(0x1234))); CHECK((etl::has_zero_byte(uint16_t(0x0100))));
CHECK_EQUAL(0x1234123412341234U, (etl::binary_fill<uint64_t>::value<uint16_t>(0x1234)));
CHECK_EQUAL(0x1234, (etl::binary_fill<int16_t>::value<int16_t>(0x1234))); CHECK(!(etl::has_zero_byte(int16_t(0x0123))));
CHECK_EQUAL(0x12341234, (etl::binary_fill<int32_t>::value<int16_t>(0x1234))); CHECK((etl::has_zero_byte(int16_t(0x0100))));
CHECK_EQUAL(0x1234123412341234, (etl::binary_fill<int64_t>::value<int16_t>(0x1234)));
CHECK_EQUAL(0x12345678U, (etl::binary_fill<uint32_t>::value<uint32_t>(0x12345678))); CHECK(!(etl::has_zero_byte(uint32_t(0x01234567))));
CHECK_EQUAL(0x1234567812345678U, (etl::binary_fill<uint64_t>::value<uint32_t>(0x12345678))); CHECK((etl::has_zero_byte(uint32_t(0x01230067))));
CHECK_EQUAL(int32_t(0x12345678), int32_t(etl::binary_fill<int32_t>::value<int32_t>(0x12345678))); CHECK(!(etl::has_zero_byte(int32_t(0x01234567))));
CHECK_EQUAL(int64_t(0x1234567812345678), int64_t(etl::binary_fill<int64_t>::value<int32_t>(0x12345678))); CHECK((etl::has_zero_byte(int32_t(0x01230067))));
CHECK_EQUAL(0x123456789ABCDEF0U, (etl::binary_fill<uint64_t>::value<uint64_t>(0x123456789ABCDEF0))); CHECK(!(etl::has_zero_byte(uint64_t(0x0123456789ABCDEF))));
CHECK((etl::has_zero_byte(uint64_t(0x012345678900CDEF))));
CHECK_EQUAL(int64_t(0x123456789ABCDEF0), int64_t(etl::binary_fill<int64_t>::value<int64_t>(0x123456789ABCDEF0))); CHECK(!(etl::has_zero_byte(int64_t(0x0123456789ABCDEF))));
CHECK((etl::has_zero_byte(int64_t(0x012345678900CDEF))));
} }
//************************************************************************* //*************************************************************************
TEST(test_has_zero_compile_time) TEST(test_has_byte_n_partial_run_time)
{ {
CHECK(!(etl::has_zero_byte<uint8_t, 0x01>::test)); CHECK(!(etl::has_byte_n<uint8_t, 0x12>(uint8_t(0x01))));
CHECK((etl::has_zero_byte<uint8_t, 0x00>::test)); CHECK((etl::has_byte_n<uint8_t, 0x01>(uint8_t(0x01))));
CHECK(!(etl::has_zero_byte<int8_t, 0x01>::test)); CHECK(!(etl::has_byte_n<int8_t, 0x12>(int8_t(0x01))));
CHECK((etl::has_zero_byte<int8_t, 0x00>::test)); CHECK((etl::has_byte_n<int8_t, 0x01>(int8_t(0x01))));
CHECK(!(etl::has_zero_byte<uint16_t, 0x0123>::test)); CHECK(!(etl::has_byte_n<uint16_t, 0x12>(uint16_t(0x0123))));
CHECK((etl::has_zero_byte<uint16_t, 0x0100>::test)); CHECK((etl::has_byte_n<uint16_t, 0x23>(uint16_t(0x0123))));
CHECK(!(etl::has_zero_byte<int16_t, 0x0123>::test)); CHECK(!(etl::has_byte_n<int16_t, 0x12>(int16_t(0x0123))));
CHECK((etl::has_zero_byte<int16_t, 0x0100>::test)); CHECK((etl::has_byte_n<int16_t, 0x23>(int16_t(0x0123))));
CHECK(!(etl::has_zero_byte<uint32_t, 0x01234567>::test)); CHECK(!(etl::has_byte_n<uint32_t, 0x12>(uint32_t(0x01234567))));
CHECK((etl::has_zero_byte<uint32_t, 0x01230067>::test)); CHECK((etl::has_byte_n<uint32_t, 0x45>(uint32_t(0x01234567))));
CHECK(!(etl::has_zero_byte<int32_t, 0x01234567>::test)); CHECK(!(etl::has_byte_n<int32_t, 0x12>(int32_t(0x01234567))));
CHECK((etl::has_zero_byte<int32_t, 0x01230067>::test)); CHECK((etl::has_byte_n<int32_t, 0x45>(int32_t(0x01234567))));
CHECK(!(etl::has_zero_byte<uint64_t, 0x0123456789ABCDEF>::test)); CHECK(!(etl::has_byte_n<uint64_t, 0x12>(uint64_t(0x0123456789ABCDEF))));
CHECK((etl::has_zero_byte<uint64_t, 0x012345678900CDEF>::test)); CHECK((etl::has_byte_n<uint64_t, 0xAB>(uint64_t(0x0123456789ABCDEF))));
CHECK(!(etl::has_zero_byte<int64_t, 0x0123456789ABCDEF>::test)); CHECK(!(etl::has_byte_n<int64_t, 0x12>(int64_t(0x0123456789ABCDEF))));
CHECK((etl::has_zero_byte<int64_t, 0x012345678900CDEF>::test)); CHECK((etl::has_byte_n<int64_t, 0xAB>(int64_t(0x0123456789ABCDEF))));
} }
//************************************************************************* //*************************************************************************
TEST(test_has_zero_run_time) TEST(test_has_byte_n_run_time)
{ {
CHECK(!(etl::has_zero_byte<>::test(uint8_t(0x01)))); CHECK(!(etl::has_byte_n(uint8_t(0x01), 0x12)));
CHECK((etl::has_zero_byte<>::test(uint8_t(0x00)))); CHECK((etl::has_byte_n(uint8_t(0x01), 0x01)));
CHECK(!(etl::has_zero_byte<>::test(int8_t(0x01)))); CHECK(!(etl::has_byte_n(uint8_t(0x01), 0x12)));
CHECK((etl::has_zero_byte<>::test(int8_t(0x00)))); CHECK((etl::has_byte_n(uint8_t(0x01), 0x01)));
CHECK(!(etl::has_zero_byte<>::test(uint16_t(0x0123)))); CHECK(!(etl::has_byte_n(uint16_t(0x0123), 0x12)));
CHECK((etl::has_zero_byte<>::test(uint16_t(0x0100)))); CHECK((etl::has_byte_n(uint16_t(0x0123), 0x23)));
CHECK(!(etl::has_zero_byte<>::test(int16_t(0x0123)))); CHECK(!(etl::has_byte_n(int16_t(0x0123), 0x12)));
CHECK((etl::has_zero_byte<>::test(int16_t(0x0100)))); CHECK((etl::has_byte_n(int16_t(0x0123), 0x23)));
CHECK(!(etl::has_zero_byte<>::test(uint32_t(0x01234567)))); CHECK(!(etl::has_byte_n(uint32_t(0x01234567), 0x12)));
CHECK((etl::has_zero_byte<>::test(uint32_t(0x01230067)))); CHECK((etl::has_byte_n(uint32_t(0x01234567), 0x45)));
CHECK(!(etl::has_zero_byte<>::test(int32_t(0x01234567)))); CHECK(!(etl::has_byte_n(int32_t(0x01234567), 0x12)));
CHECK((etl::has_zero_byte<>::test(int32_t(0x01230067)))); CHECK((etl::has_byte_n(int32_t(0x01234567), 0x45)));
CHECK(!(etl::has_zero_byte<>::test(uint64_t(0x0123456789ABCDEF)))); CHECK(!(etl::has_byte_n(uint64_t(0x0123456789ABCDEF), 0x12)));
CHECK((etl::has_zero_byte<>::test(uint64_t(0x012345678900CDEF)))); CHECK((etl::has_byte_n(uint64_t(0x0123456789ABCDEF), 0xAB)));
CHECK(!(etl::has_zero_byte<>::test(int64_t(0x0123456789ABCDEF)))); CHECK(!(etl::has_byte_n(int64_t(0x0123456789ABCDEF), 0x12)));
CHECK((etl::has_zero_byte<>::test(int64_t(0x012345678900CDEF)))); CHECK((etl::has_byte_n(int64_t(0x0123456789ABCDEF), 0xAB)));
}
//*************************************************************************
TEST(test_has_n_compile_time)
{
CHECK(!(etl::has_byte_n<0x12, uint8_t, 0x01>::test));
CHECK((etl::has_byte_n<0x01, uint8_t, 0x01>::test));
CHECK(!(etl::has_byte_n<0x12, int8_t, 0x01>::test));
CHECK((etl::has_byte_n<0x01, int8_t, 0x01>::test));
CHECK(!(etl::has_byte_n<0x12, uint16_t, 0x0123>::test));
CHECK((etl::has_byte_n<0x23, uint16_t, 0x0123>::test));
CHECK(!(etl::has_byte_n<0x12, int16_t, 0x0123>::test));
CHECK((etl::has_byte_n<0x23, int16_t, 0x0123>::test));
CHECK(!(etl::has_byte_n<0x12, uint32_t, 0x01234567>::test));
CHECK((etl::has_byte_n<0x45, uint32_t, 0x01234567>::test));
CHECK(!(etl::has_byte_n<0x12, int32_t, 0x01234567>::test));
CHECK((etl::has_byte_n<0x45, int32_t, 0x01234567>::test));
CHECK(!(etl::has_byte_n<0x12, uint64_t, 0x0123456789ABCDEF>::test));
CHECK((etl::has_byte_n<0xAB, uint64_t, 0x0123456789ABCDEF>::test));
CHECK(!(etl::has_byte_n<0x12, int64_t, 0x0123456789ABCDEF>::test));
CHECK((etl::has_byte_n<0xAB, int64_t, 0x0123456789ABCDEF>::test));
}
//*************************************************************************
TEST(test_has_n_partial_run_time)
{
CHECK(!(etl::has_byte_n<0x12>::test(uint8_t(0x01))));
CHECK((etl::has_byte_n<0x01>::test(uint8_t(0x01))));
CHECK(!(etl::has_byte_n<0x12>::test(int8_t(0x01))));
CHECK((etl::has_byte_n<0x01>::test(int8_t(0x01))));
CHECK(!(etl::has_byte_n<0x12>::test(uint16_t(0x0123))));
CHECK((etl::has_byte_n<0x23>::test(uint16_t(0x0123))));
CHECK(!(etl::has_byte_n<0x12>::test(int16_t(0x0123))));
CHECK((etl::has_byte_n<0x23>::test(int16_t(0x0123))));
CHECK(!(etl::has_byte_n<0x12>::test(uint32_t(0x01234567))));
CHECK((etl::has_byte_n<0x45>::test(uint32_t(0x01234567))));
CHECK(!(etl::has_byte_n<0x12>::test(int32_t(0x01234567))));
CHECK((etl::has_byte_n<0x45>::test(int32_t(0x01234567))));
CHECK(!(etl::has_byte_n<0x12>::test(uint64_t(0x0123456789ABCDEF))));
CHECK((etl::has_byte_n<0xAB>::test(uint64_t(0x0123456789ABCDEF))));
CHECK(!(etl::has_byte_n<0x12>::test(int64_t(0x0123456789ABCDEF))));
CHECK((etl::has_byte_n<0xAB>::test(int64_t(0x0123456789ABCDEF))));
}
//*************************************************************************
TEST(test_has_n_run_time)
{
CHECK(!(etl::has_byte_n<>::test(uint8_t(0x01), 0x12)));
CHECK((etl::has_byte_n<>::test(uint8_t(0x01), 0x01)));
CHECK(!(etl::has_byte_n<>::test(uint8_t(0x01), 0x12)));
CHECK((etl::has_byte_n<>::test(uint8_t(0x01), 0x01)));
CHECK(!(etl::has_byte_n<>::test(uint16_t(0x0123), 0x12)));
CHECK((etl::has_byte_n<>::test(uint16_t(0x0123), 0x23)));
CHECK(!(etl::has_byte_n<>::test(int16_t(0x0123), 0x12)));
CHECK((etl::has_byte_n<>::test(int16_t(0x0123), 0x23)));
CHECK(!(etl::has_byte_n<>::test(uint32_t(0x01234567), 0x12)));
CHECK((etl::has_byte_n<>::test(uint32_t(0x01234567), 0x45)));
CHECK(!(etl::has_byte_n<>::test(int32_t(0x01234567), 0x12)));
CHECK((etl::has_byte_n<>::test(int32_t(0x01234567), 0x45)));
CHECK(!(etl::has_byte_n<>::test(uint64_t(0x0123456789ABCDEF), 0x12)));
CHECK((etl::has_byte_n<>::test(uint64_t(0x0123456789ABCDEF), 0xAB)));
CHECK(!(etl::has_byte_n<>::test(int64_t(0x0123456789ABCDEF), 0x12)));
CHECK((etl::has_byte_n<>::test(int64_t(0x0123456789ABCDEF), 0xAB)));
} }
//************************************************************************* //*************************************************************************

View File

@ -21,6 +21,8 @@ Global
Debug MSVC - String Truncation Is Error|x64 = Debug MSVC - String Truncation Is Error|x64 Debug MSVC - String Truncation Is Error|x64 = Debug MSVC - String Truncation Is Error|x64
Debug MSVC 64|Win32 = Debug MSVC 64|Win32 Debug MSVC 64|Win32 = Debug MSVC 64|Win32
Debug MSVC 64|x64 = Debug MSVC 64|x64 Debug MSVC 64|x64 = Debug MSVC 64|x64
Debug MSVC No Checks|Win32 = Debug MSVC No Checks|Win32
Debug MSVC No Checks|x64 = Debug MSVC No Checks|x64
Debug MSVC|Win32 = Debug MSVC|Win32 Debug MSVC|Win32 = Debug MSVC|Win32
Debug MSVC|x64 = Debug MSVC|x64 Debug MSVC|x64 = Debug MSVC|x64
Release|Win32 = Release|Win32 Release|Win32 = Release|Win32
@ -55,6 +57,10 @@ Global
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC 64|Win32.Build.0 = Debug No Unit Tests|Win32 {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC 64|Win32.Build.0 = Debug No Unit Tests|Win32
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC 64|x64.ActiveCfg = Debug64|x64 {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC 64|x64.ActiveCfg = Debug64|x64
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC 64|x64.Build.0 = Debug64|x64 {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC 64|x64.Build.0 = Debug64|x64
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC No Checks|Win32.ActiveCfg = Debug MSVC No Checks|Win32
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC No Checks|Win32.Build.0 = Debug MSVC No Checks|Win32
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC No Checks|x64.ActiveCfg = Debug MSVC No Checks|x64
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC No Checks|x64.Build.0 = Debug MSVC No Checks|x64
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC|Win32.ActiveCfg = Debug|Win32 {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC|Win32.ActiveCfg = Debug|Win32
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC|Win32.Build.0 = Debug|Win32 {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC|Win32.Build.0 = Debug|Win32
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC|x64.ActiveCfg = Debug|x64 {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC|x64.ActiveCfg = Debug|x64

View File

@ -17,6 +17,14 @@
<Configuration>Debug LLVM</Configuration> <Configuration>Debug LLVM</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug MSVC No Checks|Win32">
<Configuration>Debug MSVC No Checks</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug MSVC No Checks|x64">
<Configuration>Debug MSVC No Checks</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug64|Win32"> <ProjectConfiguration Include="Debug64|Win32">
<Configuration>Debug64</Configuration> <Configuration>Debug64</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
@ -96,6 +104,12 @@
<PlatformToolset>v141</PlatformToolset> <PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
@ -138,6 +152,12 @@
<PlatformToolset>v141</PlatformToolset> <PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
@ -218,6 +238,9 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
@ -239,6 +262,9 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
@ -281,6 +307,11 @@
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild> <PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
<IntDir>\$(IntDir)</IntDir> <IntDir>\$(IntDir)</IntDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">
<LinkIncremental>true</LinkIncremental>
<PostBuildEventUseInBuild>false</PostBuildEventUseInBuild>
<IntDir>\$(IntDir)</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild> <PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
@ -315,6 +346,10 @@
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild> <PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">
<LinkIncremental>true</LinkIncremental>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild> <PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
@ -385,6 +420,27 @@
<Command>$(OutDir)\etl.exe</Command> <Command>$(OutDir)\etl.exe</Command>
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_NO_CHECKS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../../../unittest-cpp/;../../include;../../test</AdditionalIncludeDirectories>
<UndefinePreprocessorDefinitions>
</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>false</MultiProcessorCompilation>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PostBuildEvent>
<Command>$(OutDir)\etl.exe</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">
<ClCompile> <ClCompile>
<PrecompiledHeader> <PrecompiledHeader>
@ -565,6 +621,27 @@
<Command>$(OutDir)\etl.exe</Command> <Command>$(OutDir)\etl.exe</Command>
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../../unittest-cpp/UnitTest++/;../../include/etl;../../test</AdditionalIncludeDirectories>
<UndefinePreprocessorDefinitions>
</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>false</MultiProcessorCompilation>
<LanguageStandard>stdcpp14</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PostBuildEvent>
<Command>$(OutDir)\etl.exe</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">
<ClCompile> <ClCompile>
<PrecompiledHeader> <PrecompiledHeader>
@ -888,12 +965,12 @@
<ClInclude Include="..\..\include\etl\absolute.h" /> <ClInclude Include="..\..\include\etl\absolute.h" />
<ClInclude Include="..\..\include\etl\limits.h" /> <ClInclude Include="..\..\include\etl\limits.h" />
<ClInclude Include="..\..\include\etl\macros.h" /> <ClInclude Include="..\..\include\etl\macros.h" />
<ClInclude Include="..\..\include\etl\message_packet temp.h" />
<ClInclude Include="..\..\include\etl\message_packet.h" /> <ClInclude Include="..\..\include\etl\message_packet.h" />
<ClInclude Include="..\..\include\etl\message_packet_generator.h" /> <ClInclude Include="..\..\include\etl\message_packet_generator.h" />
<ClInclude Include="..\..\include\etl\multi_array.h" /> <ClInclude Include="..\..\include\etl\multi_array.h" />
<ClInclude Include="..\..\include\etl\mutex\mutex_freertos.h" /> <ClInclude Include="..\..\include\etl\mutex\mutex_freertos.h" />
<ClInclude Include="..\..\include\etl\negative.h" /> <ClInclude Include="..\..\include\etl\negative.h" />
<ClInclude Include="..\..\include\etl\null_type.h" />
<ClInclude Include="..\..\include\etl\private\choose_namespace.h" /> <ClInclude Include="..\..\include\etl\private\choose_namespace.h" />
<ClInclude Include="..\..\include\etl\private\crc16_poly_0x1021_.h" /> <ClInclude Include="..\..\include\etl\private\crc16_poly_0x1021_.h" />
<ClInclude Include="..\..\include\etl\private\crc16_poly_0x8005.h" /> <ClInclude Include="..\..\include\etl\private\crc16_poly_0x8005.h" />
@ -1136,6 +1213,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild>
@ -1144,6 +1222,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild>
@ -1171,6 +1250,7 @@
</ClCompile> </ClCompile>
<ClCompile Include="..\test_flat_set.cpp"> <ClCompile Include="..\test_flat_set.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild>
@ -1179,6 +1259,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild>
@ -1201,6 +1282,7 @@
<ClCompile Include="..\test_integral_limits.cpp" /> <ClCompile Include="..\test_integral_limits.cpp" />
<ClCompile Include="..\test_intrusive_forward_list.cpp"> <ClCompile Include="..\test_intrusive_forward_list.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild>
@ -1209,6 +1291,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild>
@ -1221,6 +1304,7 @@
</ClCompile> </ClCompile>
<ClCompile Include="..\test_intrusive_links.cpp"> <ClCompile Include="..\test_intrusive_links.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild>
@ -1229,6 +1313,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild>
@ -1241,6 +1326,7 @@
</ClCompile> </ClCompile>
<ClCompile Include="..\test_intrusive_list.cpp"> <ClCompile Include="..\test_intrusive_list.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild>
@ -1249,6 +1335,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild>
@ -1261,6 +1348,7 @@
</ClCompile> </ClCompile>
<ClCompile Include="..\test_intrusive_queue.cpp"> <ClCompile Include="..\test_intrusive_queue.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild>
@ -1269,6 +1357,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild>
@ -1281,6 +1370,7 @@
</ClCompile> </ClCompile>
<ClCompile Include="..\test_intrusive_stack.cpp"> <ClCompile Include="..\test_intrusive_stack.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild>
@ -1289,6 +1379,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild>
@ -1306,6 +1397,7 @@
<ClCompile Include="..\test_list.cpp" /> <ClCompile Include="..\test_list.cpp" />
<ClCompile Include="..\test_flat_map.cpp"> <ClCompile Include="..\test_flat_map.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild>
@ -1314,6 +1406,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild>
@ -1330,6 +1423,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild>
@ -1338,6 +1432,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild>
@ -1359,6 +1454,7 @@
<ClCompile Include="..\test_numeric.cpp" /> <ClCompile Include="..\test_numeric.cpp" />
<ClCompile Include="..\test_observer.cpp"> <ClCompile Include="..\test_observer.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|Win32'">false</ExcludedFromBuild>
@ -1367,6 +1463,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStringTruncationIsError|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug No STL|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugNoSTL|x64'">false</ExcludedFromBuild>

View File

@ -825,12 +825,12 @@
<ClInclude Include="..\..\include\etl\message_packet_generator.h"> <ClInclude Include="..\..\include\etl\message_packet_generator.h">
<Filter>ETL\Frameworks\Generators</Filter> <Filter>ETL\Frameworks\Generators</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\include\etl\message_packet temp.h">
<Filter>ETL\Frameworks</Filter>
</ClInclude>
<ClInclude Include="..\..\include\etl\message_packet.h"> <ClInclude Include="..\..\include\etl\message_packet.h">
<Filter>ETL\Frameworks</Filter> <Filter>ETL\Frameworks</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\include\etl\null_type.h">
<Filter>ETL\Utilities</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\main.cpp"> <ClCompile Include="..\main.cpp">