mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-30 22:38:44 +08:00
Merge branch 'development'
This commit is contained in:
commit
8b42bb502a
@ -459,6 +459,54 @@ namespace etl
|
||||
template <typename T>
|
||||
ETL_CONSTANT bool statics_char32_t<T>::is_signed;
|
||||
#endif
|
||||
|
||||
#if ETL_USING_20BIT_TYPES
|
||||
template <typename T = void>
|
||||
struct statics___int20
|
||||
{
|
||||
typedef __int20 value_type;
|
||||
|
||||
static ETL_CONSTANT __int20 min = 0x80000;
|
||||
static ETL_CONSTANT __int20 max = 0x7FFFF;
|
||||
static ETL_CONSTANT int bits = 20;
|
||||
static ETL_CONSTANT bool is_signed = true;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
ETL_CONSTANT __int20 statics___int20<T>::min;
|
||||
|
||||
template <typename T>
|
||||
ETL_CONSTANT __int20 statics___int20<T>::max;
|
||||
|
||||
template <typename T>
|
||||
ETL_CONSTANT int statics___int20<T>::bits;
|
||||
|
||||
template <typename T>
|
||||
ETL_CONSTANT bool statics___int20<T>::is_signed;
|
||||
|
||||
template <typename T = void>
|
||||
struct statics_unsigned___int20
|
||||
{
|
||||
typedef unsigned __int20 value_type;
|
||||
|
||||
static ETL_CONSTANT unsigned __int20 min = 0;
|
||||
static ETL_CONSTANT unsigned __int20 max = 0xFFFFF;
|
||||
static ETL_CONSTANT int bits = 20;
|
||||
static ETL_CONSTANT bool is_signed = false;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
ETL_CONSTANT unsigned __int20 statics_unsigned___int20<T>::min;
|
||||
|
||||
template <typename T>
|
||||
ETL_CONSTANT unsigned __int20 statics_unsigned___int20<T>::max;
|
||||
|
||||
template <typename T>
|
||||
ETL_CONSTANT int statics_unsigned___int20<T>::bits;
|
||||
|
||||
template <typename T>
|
||||
ETL_CONSTANT bool statics_unsigned___int20<T>::is_signed;
|
||||
#endif
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -556,6 +604,21 @@ namespace etl
|
||||
struct integral_limits<unsigned long long> : public private_integral_limits::statics_unsigned_long_long<>
|
||||
{
|
||||
};
|
||||
|
||||
#if ETL_USING_20BIT_TYPES
|
||||
//***************************************************************************
|
||||
///\ingroup integral_limits
|
||||
//***************************************************************************
|
||||
template <>
|
||||
struct integral_limits<__int20> : public private_integral_limits::statics___int20<>
|
||||
{
|
||||
};
|
||||
|
||||
template <>
|
||||
struct integral_limits<unsigned __int20> : public private_integral_limits::statics_unsigned___int20<>
|
||||
{
|
||||
};
|
||||
#endif
|
||||
}
|
||||
|
||||
#include "private/minmax_pop.h"
|
||||
|
||||
@ -117,6 +117,17 @@ SOFTWARE.
|
||||
|
||||
#define ETL_8BIT_SUPPORT (CHAR_BIT == 8) // Deprecated
|
||||
|
||||
//*************************************
|
||||
// Some targets support 20bit types.
|
||||
#if defined(ETL_USE_20BIT_TYPES)
|
||||
#define ETL_USING_20BIT_TYPES 1
|
||||
#define ETL_NOT_USING_20BIT_TYPES 0
|
||||
#else
|
||||
#define ETL_USING_20BIT_TYPES 0
|
||||
#define ETL_NOT_USING_20BIT_TYPES 1
|
||||
#endif
|
||||
|
||||
|
||||
//*************************************
|
||||
// Helper macro for ETL_NO_64BIT_TYPES.
|
||||
#if defined(ETL_NO_64BIT_TYPES)
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
20.39.0
|
||||
|
||||
Refactored:
|
||||
Breaking change.
|
||||
Modified io_port classes so that they are not derived from iterator types.
|
||||
Added iterator and const_iterator types.
|
||||
Added iter() and citer() member functions to get an iterator.
|
||||
@ -10,8 +11,9 @@ Modified io_port classes so that they are not derived from iterator types.
|
||||
|
||||
Fixes:
|
||||
#921 unique_ptr reset
|
||||
#923 Missing equality operator for class expected
|
||||
#923 Missing equality operator for class expected
|
||||
#930 Unused parameter warnings
|
||||
#931 Using etl::make_vector to make a vector of two pairs causes a compile error
|
||||
|
||||
Features:
|
||||
#918 Request for additional operator support for etl::io_port_*
|
||||
@ -27,7 +29,10 @@ Pull Requests
|
||||
#927 Fix missing partial specialisation equal operators
|
||||
#928 Add missing swap implementations for expected
|
||||
#929 Fix run-tests.sh script
|
||||
#932 Fix issue #931 Using etl::make_vector to make a vector of two pairs causes a compile error
|
||||
#934 Fixes compiler detection with Wundef
|
||||
#935 Added 20 bit integral limits (MSP430 devices)
|
||||
New configuration macro, ETL_USE_20BIT_TYPES, which controls the definition of ETL_USING_20BIT_TYPES and ETL_NOT_USING_20BIT_TYPES.
|
||||
|
||||
===============================================================================
|
||||
20.38.17
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user