mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
Fix test array sizes
C++14 compiler compatibility Updated test run scripts Changed some ETL_ASSERT macros to ETL_ASSERT_OR_RETURN Changed unit test macros for C++20 compaibility Updated test run scripts Updated CMake files to allow C++ standard selection Replaced ETL_ASSERT_AND_RETURN with ETL_ASSERT_OR_RETURN Updated C++14 & C++20 unit test compatibility Changed native char8_t check Added optional optimisation argument to bash script
This commit is contained in:
parent
bb3faea614
commit
8eabe5fb26
3
.gitignore
vendored
3
.gitignore
vendored
@ -376,3 +376,6 @@ test/vs2022/Debug MSVC C++20
|
||||
test/vs2022/Debug MSVC - Force C++03
|
||||
test/vs2022/Debug MSVC - No STL - Built-ins
|
||||
test/vs2022/Debug MSVC - No STL - Force Built-ins
|
||||
test/temp
|
||||
test/vs2022/Debug MSVC C++14
|
||||
test/vs2022/Debug MSVC C++20 - No STL
|
||||
|
||||
@ -267,12 +267,12 @@ namespace etl
|
||||
// Wrapped around already
|
||||
if (write_index < read_index)
|
||||
{
|
||||
ETL_ASSERT_AND_RETURN((windex == write_index) && ((wsize + 1) <= read_index), ETL_ERROR(bip_buffer_reserve_invalid));
|
||||
ETL_ASSERT_OR_RETURN((windex == write_index) && ((wsize + 1) <= read_index), ETL_ERROR(bip_buffer_reserve_invalid));
|
||||
}
|
||||
// No wraparound so far, also not wrapping around with this block
|
||||
else if (windex == write_index)
|
||||
{
|
||||
ETL_ASSERT_AND_RETURN(wsize <= (capacity() - write_index), ETL_ERROR(bip_buffer_reserve_invalid));
|
||||
ETL_ASSERT_OR_RETURN(wsize <= (capacity() - write_index), ETL_ERROR(bip_buffer_reserve_invalid));
|
||||
|
||||
// Move both indexes forward
|
||||
last.store(windex + wsize, etl::memory_order_release);
|
||||
@ -280,7 +280,7 @@ namespace etl
|
||||
// Wrapping around now
|
||||
else
|
||||
{
|
||||
ETL_ASSERT_AND_RETURN((windex == 0) && ((wsize + 1) <= read_index), ETL_ERROR(bip_buffer_reserve_invalid));
|
||||
ETL_ASSERT_OR_RETURN((windex == 0) && ((wsize + 1) <= read_index), ETL_ERROR(bip_buffer_reserve_invalid));
|
||||
}
|
||||
|
||||
// Always update write index
|
||||
@ -330,7 +330,7 @@ namespace etl
|
||||
if (rsize > 0)
|
||||
{
|
||||
size_type rsize_checker = rsize;
|
||||
ETL_ASSERT_AND_RETURN((rindex == get_read_reserve(&rsize_checker)) && (rsize == rsize_checker), ETL_ERROR(bip_buffer_reserve_invalid));
|
||||
ETL_ASSERT_OR_RETURN((rindex == get_read_reserve(&rsize_checker)) && (rsize == rsize_checker), ETL_ERROR(bip_buffer_reserve_invalid));
|
||||
|
||||
read.store(rindex + rsize, etl::memory_order_release);
|
||||
}
|
||||
|
||||
@ -48,33 +48,6 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
//***************************************************************************
|
||||
/// Exception base for bit streams
|
||||
//***************************************************************************
|
||||
class bit_stream_exception : public etl::exception
|
||||
{
|
||||
public:
|
||||
|
||||
bit_stream_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
|
||||
: exception(reason_, file_name_, line_number_)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
///\ingroup string
|
||||
/// String empty exception.
|
||||
//***************************************************************************
|
||||
class bit_stream_overflow : public etl::bit_stream_exception
|
||||
{
|
||||
public:
|
||||
|
||||
bit_stream_overflow(string_type file_name_, numeric_type line_number_)
|
||||
: bit_stream_exception(ETL_ERROR_TEXT("bit_stream:overflow", ETL_BIT_STREAM_FILE_ID"A"), file_name_, line_number_)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// Encodes and decodes bitstreams.
|
||||
/// Data must be stored in the stream in network order.
|
||||
@ -89,8 +62,8 @@ namespace etl
|
||||
/// Default constructor.
|
||||
//***************************************************************************
|
||||
bit_stream()
|
||||
: pdata(ETL_NULLPTR),
|
||||
length_chars(0U)
|
||||
: pdata(ETL_NULLPTR)
|
||||
, length_chars(0U)
|
||||
{
|
||||
restart();
|
||||
}
|
||||
@ -99,8 +72,8 @@ namespace etl
|
||||
/// Construct from range.
|
||||
//***************************************************************************
|
||||
bit_stream(void* begin_, void* end_)
|
||||
: pdata(reinterpret_cast<unsigned char*>(begin_)),
|
||||
length_chars(etl::distance(reinterpret_cast<unsigned char*>(begin_), reinterpret_cast<unsigned char*>(end_)))
|
||||
: pdata(reinterpret_cast<unsigned char*>(begin_))
|
||||
, length_chars(etl::distance(reinterpret_cast<unsigned char*>(begin_), reinterpret_cast<unsigned char*>(end_)))
|
||||
{
|
||||
restart();
|
||||
}
|
||||
@ -109,8 +82,8 @@ namespace etl
|
||||
/// Construct from begin and length.
|
||||
//***************************************************************************
|
||||
bit_stream(void* begin_, size_t length_)
|
||||
: pdata(reinterpret_cast<unsigned char*>(begin_)),
|
||||
length_chars(length_)
|
||||
: pdata(reinterpret_cast<unsigned char*>(begin_))
|
||||
, length_chars(length_)
|
||||
{
|
||||
restart();
|
||||
}
|
||||
@ -667,10 +640,6 @@ namespace etl
|
||||
{
|
||||
write_unchecked(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
ETL_ASSERT_FAIL(ETL_ERROR(etl::bit_stream_overflow));
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
@ -700,10 +669,6 @@ namespace etl
|
||||
{
|
||||
write_unchecked(value, nbits);
|
||||
}
|
||||
else
|
||||
{
|
||||
ETL_ASSERT_FAIL(ETL_ERROR(etl::bit_stream_overflow));
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
@ -730,10 +695,6 @@ namespace etl
|
||||
step(static_cast<unsigned char>(nbits));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ETL_ASSERT_FAIL(ETL_ERROR(etl::bit_stream_overflow));
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
@ -1144,10 +1105,6 @@ namespace etl
|
||||
{
|
||||
result = read_unchecked<bool>();
|
||||
}
|
||||
else
|
||||
{
|
||||
ETL_ASSERT_FAIL(ETL_ERROR(etl::bit_stream_overflow));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -1180,10 +1137,6 @@ namespace etl
|
||||
{
|
||||
result = read_unchecked<T>(nbits);
|
||||
}
|
||||
else
|
||||
{
|
||||
ETL_ASSERT_FAIL(ETL_ERROR(etl::bit_stream_overflow));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -1266,10 +1219,6 @@ namespace etl
|
||||
step(static_cast<unsigned char>(nbits));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ETL_ASSERT_FAIL_AND_RETURN_VALUE(ETL_ERROR(etl::bit_stream_overflow), false);
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@ -744,9 +744,9 @@ namespace etl
|
||||
#endif
|
||||
#endif
|
||||
|
||||
volatile etl::timer_semaphore_t process_semaphore;
|
||||
etl::timer_semaphore_t process_semaphore;
|
||||
#endif
|
||||
volatile uint_least8_t registered_timers;
|
||||
uint_least8_t registered_timers;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -562,9 +562,9 @@ namespace etl
|
||||
// The list of active timers.
|
||||
timer_list active_list;
|
||||
|
||||
volatile bool enabled;
|
||||
volatile TSemaphore process_semaphore;
|
||||
volatile uint_least8_t number_of_registered_timers;
|
||||
bool enabled;
|
||||
TSemaphore process_semaphore;
|
||||
uint_least8_t number_of_registered_timers;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -564,8 +564,8 @@ namespace etl
|
||||
// The list of active timers.
|
||||
timer_list active_list;
|
||||
|
||||
volatile bool enabled;
|
||||
volatile uint_least8_t number_of_registered_timers;
|
||||
bool enabled;
|
||||
uint_least8_t number_of_registered_timers;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -573,8 +573,8 @@ namespace etl
|
||||
// The list of active timers.
|
||||
timer_list active_list;
|
||||
|
||||
volatile bool enabled;
|
||||
volatile uint_least8_t number_of_registered_timers;
|
||||
bool enabled;
|
||||
uint_least8_t number_of_registered_timers;
|
||||
|
||||
try_lock_type try_lock; ///< The callback that tries to lock.
|
||||
lock_type lock; ///< The callback that locks.
|
||||
|
||||
@ -58,11 +58,11 @@ namespace etl
|
||||
|
||||
template<> struct char_traits_types<wchar_t>
|
||||
{
|
||||
typedef wchar_t char_type;
|
||||
typedef wchar_t int_type;
|
||||
typedef long long off_type;
|
||||
typedef size_t pos_type;
|
||||
typedef char state_type;
|
||||
typedef wchar_t char_type;
|
||||
typedef uint_least16_t int_type;
|
||||
typedef long long off_type;
|
||||
typedef size_t pos_type;
|
||||
typedef char state_type;
|
||||
};
|
||||
|
||||
#if ETL_USING_CPP20
|
||||
|
||||
@ -269,8 +269,8 @@ namespace etl
|
||||
//***************************************************************************
|
||||
#if defined(ETL_NO_CHECKS)
|
||||
#define ETL_ASSERT(b, e) // Does nothing.
|
||||
#define ETL_ASSERT_AND_RETURN(b, e) // Does nothing.
|
||||
#define ETL_ASSERT_AND_RETURN_VALUE(b, e, v) // Does nothing.
|
||||
#define ETL_ASSERT_OR_RETURN(b, e) // Does nothing.
|
||||
#define ETL_ASSERT_OR_RETURN_VALUE(b, e, v) // Does nothing.
|
||||
|
||||
#define ETL_ASSERT_FAIL(e) // Does nothing.
|
||||
#define ETL_ASSERT_FAIL_AND_RETURN(e) // Does nothing.
|
||||
@ -278,27 +278,27 @@ namespace etl
|
||||
#elif ETL_USING_EXCEPTIONS
|
||||
#if defined(ETL_LOG_ERRORS)
|
||||
#define ETL_ASSERT(b, e) {if (!(b)) {etl::error_handler::error((e)); throw((e));}} // If the condition fails, calls the error handler then throws an exception.
|
||||
#define ETL_ASSERT_AND_RETURN(b, e) {if (!(b)) {etl::error_handler::error((e)); throw((e)); return;}} // If the condition fails, calls the error handler then throws an exception.
|
||||
#define ETL_ASSERT_AND_RETURN_VALUE(b, e, v) {if (!(b)) {etl::error_handler::error((e)); throw((e)); return(v);}} // If the condition fails, calls the error handler then throws an exception.
|
||||
#define ETL_ASSERT_OR_RETURN(b, e) {if (!(b)) {etl::error_handler::error((e)); throw((e)); return;}} // If the condition fails, calls the error handler then throws an exception.
|
||||
#define ETL_ASSERT_OR_RETURN_VALUE(b, e, v) {if (!(b)) {etl::error_handler::error((e)); throw((e)); return(v);}} // If the condition fails, calls the error handler then throws an exception.
|
||||
|
||||
#define ETL_ASSERT_FAIL(e) {etl::error_handler::error((e)); throw((e));} // Calls the error handler then throws an exception.
|
||||
#define ETL_ASSERT_FAIL_AND_RETURN(e) {etl::error_handler::error((e)); throw((e)); return;} // Calls the error handler then throws an exception.
|
||||
#define ETL_ASSERT_FAIL_AND_RETURN_VALUE(e, v) {etl::error_handler::error((e)); throw((e)); return(v);} // Calls the error handler then throws an exception.
|
||||
#else
|
||||
#define ETL_ASSERT(b, e) {if (!(b)) {throw((e));}} // If the condition fails, throws an exception.
|
||||
#define ETL_ASSERT_AND_RETURN(b, e) {if (!(b)) {throw((e)); return;}} // If the condition fails, throws an exception.
|
||||
#define ETL_ASSERT_AND_RETURN_VALUE(b, e, v) {if (!(b)) {throw((e)); return(v);}} // If the condition fails, throws an exception.
|
||||
#define ETL_ASSERT(b, e) {if (!(b)) {throw((e));}} // If the condition fails, throws an exception.
|
||||
#define ETL_ASSERT_OR_RETURN(b, e) {if (!(b)) {throw((e));}} // If the condition fails, throws an exception.
|
||||
#define ETL_ASSERT_OR_RETURN_VALUE(b, e, v) {if (!(b)) {throw((e));}} // If the condition fails, throws an exception.
|
||||
|
||||
#define ETL_ASSERT_FAIL(e) {throw((e));} // Throws an exception.
|
||||
#define ETL_ASSERT_FAIL_AND_RETURN(e) {throw((e)); return;} // Throws an exception.
|
||||
#define ETL_ASSERT_FAIL_AND_RETURN_VALUE(e, v) {throw((e)); return(v);} // Throws an exception.
|
||||
#define ETL_ASSERT_FAIL(e) {throw((e));} // Throws an exception.
|
||||
#define ETL_ASSERT_FAIL_AND_RETURN(e) {throw((e));} // Throws an exception.
|
||||
#define ETL_ASSERT_FAIL_AND_RETURN_VALUE(e, v) {throw((e));} // Throws an exception.
|
||||
|
||||
#endif
|
||||
#else
|
||||
#if defined(ETL_LOG_ERRORS)
|
||||
#define ETL_ASSERT(b, e) {if(!(b)) {etl::error_handler::error((e));}} // If the condition fails, calls the error handler
|
||||
#define ETL_ASSERT_AND_RETURN(b, e) {if(!(b)) {etl::error_handler::error((e)); return;}} // If the condition fails, calls the error handler and return
|
||||
#define ETL_ASSERT_AND_RETURN_VALUE(b, e, v) {if(!(b)) {etl::error_handler::error((e)); return (v);}} // If the condition fails, calls the error handler and return a value
|
||||
#define ETL_ASSERT_OR_RETURN(b, e) {if(!(b)) {etl::error_handler::error((e)); return;}} // If the condition fails, calls the error handler and return
|
||||
#define ETL_ASSERT_OR_RETURN_VALUE(b, e, v) {if(!(b)) {etl::error_handler::error((e)); return (v);}} // If the condition fails, calls the error handler and return a value
|
||||
|
||||
#define ETL_ASSERT_FAIL(e) {etl::error_handler::error((e));} // Calls the error handler
|
||||
#define ETL_ASSERT_FAIL_AND_RETURN(e) {etl::error_handler::error((e)); return;} // Calls the error handler and return
|
||||
@ -306,16 +306,16 @@ namespace etl
|
||||
#else
|
||||
#if ETL_IS_DEBUG_BUILD
|
||||
#define ETL_ASSERT(b, e) assert((b)) // If the condition fails, asserts.
|
||||
#define ETL_ASSERT_AND_RETURN(b, e) {if (!(b)) {assert(false); return;}} // If the condition fails, asserts and return.
|
||||
#define ETL_ASSERT_AND_RETURN_VALUE(b, e, v) {if (!(b)) {assert(false); return(v);}} // If the condition fails, asserts and return a value.
|
||||
#define ETL_ASSERT_OR_RETURN(b, e) {if (!(b)) {assert(false); return;}} // If the condition fails, asserts and return.
|
||||
#define ETL_ASSERT_OR_RETURN_VALUE(b, e, v) {if (!(b)) {assert(false); return(v);}} // If the condition fails, asserts and return a value.
|
||||
|
||||
#define ETL_ASSERT_FAIL(e) assert(false) // Asserts.
|
||||
#define ETL_ASSERT_FAIL_AND_RETURN(e) {assert(false); return;} // Asserts.
|
||||
#define ETL_ASSERT_FAIL_AND_RETURN_VALUE(e, v) {assert(false); return(v);} // Asserts.
|
||||
#else
|
||||
#define ETL_ASSERT(b, e) // Does nothing.
|
||||
#define ETL_ASSERT_AND_RETURN(b, e) {if (!(b)) return;} // Returns.
|
||||
#define ETL_ASSERT_AND_RETURN_VALUE(b, e, v) {if (!(b)) return(v);} // Returns a value.
|
||||
#define ETL_ASSERT_OR_RETURN(b, e) {if (!(b)) return;} // Returns.
|
||||
#define ETL_ASSERT_OR_RETURN_VALUE(b, e, v) {if (!(b)) return(v);} // Returns a value.
|
||||
|
||||
#define ETL_ASSERT_FAIL(e) // Does nothing.
|
||||
#define ETL_ASSERT_FAIL_AND_RETURN(e) {return;} // Returns.
|
||||
|
||||
@ -380,12 +380,12 @@ namespace etl
|
||||
################################################
|
||||
def generate_static_assert_cpp03(n):
|
||||
cog.outl(" // Not etl::message_packet, not etl::imessage and in typelist.")
|
||||
cog.out(" static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<")
|
||||
cog.out(" static const bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<")
|
||||
for i in range(1, n):
|
||||
cog.out("T%d, " % i)
|
||||
cog.outl("T%s> >::value &&" % n)
|
||||
cog.outl(" !etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&")
|
||||
cog.out(" etl::is_one_of<typename etl::remove_reference<TMessage>::type,")
|
||||
cog.outl(" !etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&")
|
||||
cog.out(" etl::is_one_of<typename etl::remove_cvref<TMessage>::type,")
|
||||
for i in range(1, n):
|
||||
cog.out("T%d, " % i)
|
||||
cog.outl("T%s>::value);" % n)
|
||||
@ -395,12 +395,12 @@ namespace etl
|
||||
################################################
|
||||
def generate_static_assert_cpp11(n):
|
||||
cog.outl(" // Not etl::message_packet, not etl::imessage and in typelist.")
|
||||
cog.out(" static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<")
|
||||
cog.out(" static constexpr bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<")
|
||||
for i in range(1, n):
|
||||
cog.out("T%d, " % i)
|
||||
cog.outl("T%s> >::value &&" % n)
|
||||
cog.outl(" !etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&")
|
||||
cog.out(" etl::is_one_of<typename etl::remove_reference<TMessage>::type,")
|
||||
cog.outl(" !etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&")
|
||||
cog.out(" etl::is_one_of<typename etl::remove_cvref<TMessage>::type,")
|
||||
for i in range(1, n):
|
||||
cog.out("T%d, " % i)
|
||||
cog.outl("T%s>::value);" % n)
|
||||
@ -474,12 +474,12 @@ namespace etl
|
||||
cog.outl("#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)")
|
||||
cog.outl(" //********************************************")
|
||||
cog.outl("#include \"etl/private/diagnostic_uninitialized_push.h\"")
|
||||
cog.out(" template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<")
|
||||
cog.out(" template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<")
|
||||
for n in range(1, int(Handlers)):
|
||||
cog.out("T%s, " % n)
|
||||
cog.outl("T%s> >::value &&" % int(Handlers))
|
||||
cog.outl(" !etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&")
|
||||
cog.out(" !etl::is_one_of<typename etl::remove_reference<TMessage>::type, ")
|
||||
cog.outl(" !etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&")
|
||||
cog.out(" !etl::is_one_of<typename etl::remove_cvref<TMessage>::type, ")
|
||||
for n in range(1, int(Handlers)):
|
||||
cog.out("T%s, " % n)
|
||||
cog.outl("T%s>::value, int>::type>" % int(Handlers))
|
||||
@ -493,12 +493,12 @@ namespace etl
|
||||
cog.outl(" //********************************************")
|
||||
cog.outl("#include \"etl/private/diagnostic_uninitialized_push.h\"")
|
||||
cog.outl(" template <typename TMessage>")
|
||||
cog.out(" explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<")
|
||||
cog.out(" explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<")
|
||||
for n in range(1, int(Handlers)):
|
||||
cog.out("T%s, " % n)
|
||||
cog.outl("T%s> >::value &&" % int(Handlers))
|
||||
cog.outl(" !etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&")
|
||||
cog.out(" !etl::is_one_of<typename etl::remove_reference<TMessage>::type, ")
|
||||
cog.outl(" !etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&")
|
||||
cog.out(" !etl::is_one_of<typename etl::remove_cvref<TMessage>::type, ")
|
||||
for n in range(1, int(Handlers)):
|
||||
cog.out("T%s, " % n)
|
||||
cog.outl("T%s>::value, int>::type = 0)" % int(Handlers))
|
||||
@ -758,12 +758,12 @@ namespace etl
|
||||
cog.outl("#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)")
|
||||
cog.outl(" //********************************************")
|
||||
cog.outl("#include \"etl/private/diagnostic_uninitialized_push.h\"")
|
||||
cog.out(" template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<")
|
||||
cog.out(" template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<")
|
||||
for t in range(1, n):
|
||||
cog.out("T%s, " % t)
|
||||
cog.outl("T%s> >::value &&" % n)
|
||||
cog.outl(" !etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&")
|
||||
cog.out(" !etl::is_one_of<typename etl::remove_reference<TMessage>::type, ")
|
||||
cog.outl(" !etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&")
|
||||
cog.out(" !etl::is_one_of<typename etl::remove_cvref<TMessage>::type, ")
|
||||
for t in range(1, n):
|
||||
cog.out("T%s, " % t)
|
||||
cog.outl("T%s>::value, int>::type>" % n)
|
||||
@ -777,12 +777,12 @@ namespace etl
|
||||
cog.outl(" //********************************************")
|
||||
cog.outl("#include \"etl/private/diagnostic_uninitialized_push.h\"")
|
||||
cog.outl(" template <typename TMessage>")
|
||||
cog.out(" explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<")
|
||||
cog.out(" explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<")
|
||||
for t in range(1, n):
|
||||
cog.out("T%s, " % t)
|
||||
cog.outl("T%s> >::value &&" % n)
|
||||
cog.outl(" !etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&")
|
||||
cog.out(" !etl::is_one_of<typename etl::remove_reference<TMessage>::type, ")
|
||||
cog.outl(" !etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&")
|
||||
cog.out(" !etl::is_one_of<typename etl::remove_cvref<TMessage>::type, ")
|
||||
for t in range(1, n):
|
||||
cog.out("T%s, " % t)
|
||||
cog.outl("T%s>::value, int>::type = 0)" % n)
|
||||
|
||||
@ -620,28 +620,29 @@ namespace etl
|
||||
cog.outl(" }")
|
||||
cog.outl("")
|
||||
cog.outl(" template <typename TMessage>")
|
||||
cog.outl(" void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)")
|
||||
cog.outl(" {")
|
||||
cog.out(" if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, ")
|
||||
cog.out(" typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, ")
|
||||
for n in range(1, int(Handlers)):
|
||||
cog.out("T%s, " % n)
|
||||
if n % 4 == 0:
|
||||
cog.outl("")
|
||||
cog.out(" ")
|
||||
cog.outl("T%s>::value)" % int(Handlers))
|
||||
cog.outl(" {")
|
||||
cog.outl(" static_cast<TDerived*>(this)->on_receive(msg);")
|
||||
cog.outl("T%s>::value, void>::type" % int(Handlers))
|
||||
cog.outl(" receive(const TMessage& msg)")
|
||||
cog.outl(" {")
|
||||
cog.outl(" static_cast<TDerived*>(this)->on_receive(msg);")
|
||||
cog.outl(" }")
|
||||
cog.outl("")
|
||||
cog.outl(" template <typename TMessage>")
|
||||
cog.out(" typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, ")
|
||||
for n in range(1, int(Handlers)):
|
||||
cog.out("T%s, " % n)
|
||||
cog.outl("T%s>::value, void>::type" % int(Handlers))
|
||||
cog.outl(" receive(const TMessage& msg)")
|
||||
cog.outl(" {")
|
||||
cog.outl(" if (has_successor())")
|
||||
cog.outl(" {")
|
||||
cog.outl(" get_successor().receive(msg);")
|
||||
cog.outl(" }")
|
||||
cog.outl(" else")
|
||||
cog.outl(" {")
|
||||
cog.outl(" if (has_successor())")
|
||||
cog.outl(" {")
|
||||
cog.outl(" get_successor().receive(msg);")
|
||||
cog.outl(" }")
|
||||
cog.outl(" else")
|
||||
cog.outl(" {")
|
||||
cog.outl(" static_cast<TDerived*>(this)->on_receive_unknown(msg);")
|
||||
cog.outl(" }")
|
||||
cog.outl(" static_cast<TDerived*>(this)->on_receive_unknown(msg);")
|
||||
cog.outl(" }")
|
||||
cog.outl(" }")
|
||||
cog.outl("")
|
||||
@ -787,31 +788,33 @@ namespace etl
|
||||
cog.outl(" }")
|
||||
cog.outl("")
|
||||
cog.outl(" template <typename TMessage>")
|
||||
cog.outl(" void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)")
|
||||
cog.outl(" {")
|
||||
cog.out(" if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, ")
|
||||
cog.out(" typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, ")
|
||||
for t in range(1, n):
|
||||
cog.out("T%s, " % t)
|
||||
if t % 4 == 0:
|
||||
cog.outl("")
|
||||
cog.out(" ")
|
||||
cog.outl("T%s>::value)" % n)
|
||||
cog.outl("T%s>::value, void>::type" % n)
|
||||
cog.outl(" receive(const TMessage& msg)")
|
||||
cog.outl(" {")
|
||||
cog.outl(" static_cast<TDerived*>(this)->on_receive(msg);")
|
||||
cog.outl(" }")
|
||||
cog.outl("")
|
||||
cog.outl(" template <typename TMessage>")
|
||||
cog.out(" typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, ")
|
||||
for t in range(1, n):
|
||||
cog.out("T%s, " % t)
|
||||
cog.outl("T%s>::value, void>::type" % n)
|
||||
cog.outl(" receive(const TMessage& msg)")
|
||||
cog.outl(" {")
|
||||
cog.outl(" if (has_successor())")
|
||||
cog.outl(" {")
|
||||
cog.outl(" static_cast<TDerived*>(this)->on_receive(msg);")
|
||||
cog.outl(" get_successor().receive(msg);")
|
||||
cog.outl(" }")
|
||||
cog.outl(" else")
|
||||
cog.outl(" {")
|
||||
cog.outl(" if (has_successor())")
|
||||
cog.outl(" {")
|
||||
cog.outl(" get_successor().receive(msg);")
|
||||
cog.outl(" }")
|
||||
cog.outl(" else")
|
||||
cog.outl(" {")
|
||||
cog.outl(" static_cast<TDerived*>(this)->on_receive_unknown(msg);")
|
||||
cog.outl(" }")
|
||||
cog.outl(" static_cast<TDerived*>(this)->on_receive_unknown(msg);")
|
||||
cog.outl(" }")
|
||||
cog.outl(" }")
|
||||
cog.outl("")
|
||||
cog.outl("")
|
||||
cog.outl(" //**********************************************")
|
||||
cog.outl(" using imessage_router::accepts;")
|
||||
cog.outl("")
|
||||
|
||||
@ -107,7 +107,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
static counter_type& current_instance_count()
|
||||
{
|
||||
static counter_type counter = 0;
|
||||
static counter_type counter = { 0 };
|
||||
return counter;
|
||||
}
|
||||
};
|
||||
|
||||
@ -384,16 +384,16 @@ namespace etl
|
||||
#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value, int>::type>
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value, int>::type>
|
||||
explicit message_packet(TMessage&& msg)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value);
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -402,15 +402,15 @@ namespace etl
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage>
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value, int>::type = 0)
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value, int>::type = 0)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value);
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -677,16 +677,16 @@ namespace etl
|
||||
#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::value, int>::type>
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::value, int>::type>
|
||||
explicit message_packet(TMessage&& msg)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::value);
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -695,15 +695,15 @@ namespace etl
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage>
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::value, int>::type = 0)
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::value, int>::type = 0)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::value);
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -968,16 +968,16 @@ namespace etl
|
||||
#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::value, int>::type>
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::value, int>::type>
|
||||
explicit message_packet(TMessage&& msg)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::value);
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -986,15 +986,15 @@ namespace etl
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage>
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::value, int>::type = 0)
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::value, int>::type = 0)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::value);
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -1257,16 +1257,16 @@ namespace etl
|
||||
#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::value, int>::type>
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::value, int>::type>
|
||||
explicit message_packet(TMessage&& msg)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::value);
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -1275,15 +1275,15 @@ namespace etl
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage>
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::value, int>::type = 0)
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::value, int>::type = 0)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::value);
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -1543,16 +1543,16 @@ namespace etl
|
||||
#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::value, int>::type>
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::value, int>::type>
|
||||
explicit message_packet(TMessage&& msg)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::value);
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -1561,15 +1561,15 @@ namespace etl
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage>
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::value, int>::type = 0)
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::value, int>::type = 0)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::value);
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -1824,16 +1824,16 @@ namespace etl
|
||||
#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::value, int>::type>
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::value, int>::type>
|
||||
explicit message_packet(TMessage&& msg)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::value);
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -1842,15 +1842,15 @@ namespace etl
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage>
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::value, int>::type = 0)
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::value, int>::type = 0)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::value);
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -2103,16 +2103,16 @@ namespace etl
|
||||
#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::value, int>::type>
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::value, int>::type>
|
||||
explicit message_packet(TMessage&& msg)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::value);
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -2121,15 +2121,15 @@ namespace etl
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage>
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::value, int>::type = 0)
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::value, int>::type = 0)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::value);
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -2380,16 +2380,16 @@ namespace etl
|
||||
#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9>::value, int>::type>
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9>::value, int>::type>
|
||||
explicit message_packet(TMessage&& msg)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9>::value);
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -2398,15 +2398,15 @@ namespace etl
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage>
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9>::value, int>::type = 0)
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9>::value, int>::type = 0)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9>::value);
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -2654,16 +2654,16 @@ namespace etl
|
||||
#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8>::value, int>::type>
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8>::value, int>::type>
|
||||
explicit message_packet(TMessage&& msg)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8>::value);
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -2672,15 +2672,15 @@ namespace etl
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage>
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8>::value, int>::type = 0)
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8>::value, int>::type = 0)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8>::value);
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -2923,16 +2923,16 @@ namespace etl
|
||||
#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7>::value, int>::type>
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7>::value, int>::type>
|
||||
explicit message_packet(TMessage&& msg)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7>::value);
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -2941,15 +2941,15 @@ namespace etl
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage>
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7>::value, int>::type = 0)
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6, T7>::value, int>::type = 0)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7>::value);
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6, T7>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -3190,16 +3190,16 @@ namespace etl
|
||||
#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6>::value, int>::type>
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6>::value, int>::type>
|
||||
explicit message_packet(TMessage&& msg)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6>::value);
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -3208,15 +3208,15 @@ namespace etl
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage>
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6>::value, int>::type = 0)
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5, T6>::value, int>::type = 0)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6>::value);
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5, T6>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -3455,16 +3455,16 @@ namespace etl
|
||||
#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5>::value, int>::type>
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5>::value, int>::type>
|
||||
explicit message_packet(TMessage&& msg)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5>::value);
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -3473,15 +3473,15 @@ namespace etl
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage>
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5>::value, int>::type = 0)
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4, T5>::value, int>::type = 0)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5>::value);
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4, T5>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -3717,16 +3717,16 @@ namespace etl
|
||||
#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4>::value, int>::type>
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4>::value, int>::type>
|
||||
explicit message_packet(TMessage&& msg)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4>::value);
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -3735,15 +3735,15 @@ namespace etl
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage>
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4>::value, int>::type = 0)
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3, T4>::value, int>::type = 0)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4>::value);
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3, T4> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3, T4>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -3974,16 +3974,16 @@ namespace etl
|
||||
#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3>::value, int>::type>
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3>::value, int>::type>
|
||||
explicit message_packet(TMessage&& msg)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3>::value);
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -3992,15 +3992,15 @@ namespace etl
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage>
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3>::value, int>::type = 0)
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2, T3>::value, int>::type = 0)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3>::value);
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2, T3> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2, T3>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -4229,16 +4229,16 @@ namespace etl
|
||||
#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2>::value, int>::type>
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2>::value, int>::type>
|
||||
explicit message_packet(TMessage&& msg)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2>::value);
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -4247,15 +4247,15 @@ namespace etl
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage>
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2>::value, int>::type = 0)
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1, T2>::value, int>::type = 0)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2>::value);
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1, T2> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1, T2>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -4482,16 +4482,16 @@ namespace etl
|
||||
#if ETL_USING_CPP11 && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION) && !defined(ETL_COMPILER_GREEN_HILLS)
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1>::value, int>::type>
|
||||
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1>::value, int>::type>
|
||||
explicit message_packet(TMessage&& msg)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1>::value);
|
||||
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
@ -4500,15 +4500,15 @@ namespace etl
|
||||
//********************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
template <typename TMessage>
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1>::value, int>::type = 0)
|
||||
explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if<!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
!etl::is_one_of<typename etl::remove_cvref<TMessage>::type, T1>::value, int>::type = 0)
|
||||
: valid(true)
|
||||
{
|
||||
// Not etl::message_packet, not etl::imessage and in typelist.
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1> >::value &&
|
||||
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1>::value);
|
||||
static const bool Enabled = (!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::message_packet<T1> >::value &&
|
||||
!etl::is_same<typename etl::remove_cvref<TMessage>::type, etl::imessage>::value &&
|
||||
etl::is_one_of<typename etl::remove_cvref<TMessage>::type,T1>::value);
|
||||
|
||||
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
|
||||
}
|
||||
|
||||
@ -607,25 +607,23 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, T1, T2, T3, T4,
|
||||
T5, T6, T7, T8,
|
||||
T9, T10, T11, T12,
|
||||
T13, T14, T15, T16>::value)
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@ -753,28 +751,27 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, T1, T2, T3, T4,
|
||||
T5, T6, T7, T8,
|
||||
T9, T10, T11, T12,
|
||||
T13, T14, T15>::value)
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**********************************************
|
||||
using imessage_router::accepts;
|
||||
|
||||
@ -898,28 +895,27 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, T1, T2, T3, T4,
|
||||
T5, T6, T7, T8,
|
||||
T9, T10, T11, T12,
|
||||
T13, T14>::value)
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**********************************************
|
||||
using imessage_router::accepts;
|
||||
|
||||
@ -1042,28 +1038,27 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, T1, T2, T3, T4,
|
||||
T5, T6, T7, T8,
|
||||
T9, T10, T11, T12,
|
||||
T13>::value)
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**********************************************
|
||||
using imessage_router::accepts;
|
||||
|
||||
@ -1184,27 +1179,27 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, T1, T2, T3, T4,
|
||||
T5, T6, T7, T8,
|
||||
T9, T10, T11, T12>::value)
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**********************************************
|
||||
using imessage_router::accepts;
|
||||
|
||||
@ -1324,27 +1319,27 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, T1, T2, T3, T4,
|
||||
T5, T6, T7, T8,
|
||||
T9, T10, T11>::value)
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**********************************************
|
||||
using imessage_router::accepts;
|
||||
|
||||
@ -1463,27 +1458,27 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, T1, T2, T3, T4,
|
||||
T5, T6, T7, T8,
|
||||
T9, T10>::value)
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**********************************************
|
||||
using imessage_router::accepts;
|
||||
|
||||
@ -1601,27 +1596,27 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8, T9>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, T1, T2, T3, T4,
|
||||
T5, T6, T7, T8,
|
||||
T9>::value)
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8, T9>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**********************************************
|
||||
using imessage_router::accepts;
|
||||
|
||||
@ -1737,26 +1732,27 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, T1, T2, T3, T4,
|
||||
T5, T6, T7, T8>::value)
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7, T8>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**********************************************
|
||||
using imessage_router::accepts;
|
||||
|
||||
@ -1871,26 +1867,27 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, T1, T2, T3, T4,
|
||||
T5, T6, T7>::value)
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6, T7>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**********************************************
|
||||
using imessage_router::accepts;
|
||||
|
||||
@ -2003,26 +2000,27 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, T1, T2, T3, T4,
|
||||
T5, T6>::value)
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, T1, T2, T3, T4, T5, T6>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**********************************************
|
||||
using imessage_router::accepts;
|
||||
|
||||
@ -2134,26 +2132,27 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, T1, T2, T3, T4, T5>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, T1, T2, T3, T4,
|
||||
T5>::value)
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, T1, T2, T3, T4, T5>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**********************************************
|
||||
using imessage_router::accepts;
|
||||
|
||||
@ -2263,25 +2262,27 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, T1, T2, T3, T4>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, T1, T2, T3, T4>::value)
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, T1, T2, T3, T4>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**********************************************
|
||||
using imessage_router::accepts;
|
||||
|
||||
@ -2390,25 +2391,27 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, T1, T2, T3>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, T1, T2, T3>::value)
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, T1, T2, T3>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**********************************************
|
||||
using imessage_router::accepts;
|
||||
|
||||
@ -2516,25 +2519,27 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, T1, T2>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, T1, T2>::value)
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, T1, T2>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**********************************************
|
||||
using imessage_router::accepts;
|
||||
|
||||
@ -2641,25 +2646,27 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
void receive(const TMessage& msg, typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value, int>::type = 0)
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && etl::is_one_of<TMessage, T1>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if ETL_IF_CONSTEXPR (etl::is_one_of<TMessage, T1>::value)
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
}
|
||||
|
||||
template <typename TMessage>
|
||||
typename etl::enable_if<etl::is_base_of<imessage, TMessage>::value && !etl::is_one_of<TMessage, T1>::value, void>::type
|
||||
receive(const TMessage& msg)
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive(msg);
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (has_successor())
|
||||
{
|
||||
get_successor().receive(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
static_cast<TDerived*>(this)->on_receive_unknown(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**********************************************
|
||||
using imessage_router::accepts;
|
||||
|
||||
|
||||
@ -615,7 +615,7 @@ namespace etl
|
||||
// The list of active timers.
|
||||
private_message_timer::list active_list;
|
||||
|
||||
volatile bool enabled;
|
||||
bool enabled;
|
||||
|
||||
#if defined(ETL_MESSAGE_TIMER_USE_ATOMIC_LOCK)
|
||||
|
||||
@ -629,9 +629,9 @@ namespace etl
|
||||
#endif
|
||||
#endif
|
||||
|
||||
volatile etl::timer_semaphore_t process_semaphore;
|
||||
etl::timer_semaphore_t process_semaphore;
|
||||
#endif
|
||||
volatile uint_least8_t registered_timers;
|
||||
uint_least8_t registered_timers;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -580,9 +580,9 @@ namespace etl
|
||||
// The list of active timers.
|
||||
timer_list active_list;
|
||||
|
||||
volatile bool enabled;
|
||||
volatile TSemaphore process_semaphore;
|
||||
volatile uint_least8_t registered_timers;
|
||||
bool enabled;
|
||||
TSemaphore process_semaphore;
|
||||
uint_least8_t registered_timers;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -588,8 +588,8 @@ namespace etl
|
||||
// The list of active timers.
|
||||
timer_list active_list;
|
||||
|
||||
volatile bool enabled;
|
||||
volatile uint_least8_t number_of_registered_timers;
|
||||
bool enabled;
|
||||
uint_least8_t number_of_registered_timers;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -595,9 +595,8 @@ namespace etl
|
||||
// The list of active timers.
|
||||
timer_list active_list;
|
||||
|
||||
volatile bool enabled;
|
||||
|
||||
volatile uint_least8_t number_of_registered_timers;
|
||||
bool enabled;
|
||||
uint_least8_t number_of_registered_timers;
|
||||
|
||||
try_lock_type try_lock; ///< The callback that tries to lock.
|
||||
lock_type lock; ///< The callback that locks.
|
||||
|
||||
@ -154,7 +154,7 @@ namespace etl
|
||||
if (i_observer_item == observer_list.end())
|
||||
{
|
||||
// Is there enough room?
|
||||
ETL_ASSERT_AND_RETURN(!observer_list.full(), ETL_ERROR(etl::observer_list_full));
|
||||
ETL_ASSERT_OR_RETURN(!observer_list.full(), ETL_ERROR(etl::observer_list_full));
|
||||
|
||||
// Add it.
|
||||
observer_list.push_back(observer_item(observer));
|
||||
|
||||
@ -133,6 +133,7 @@ namespace etl
|
||||
{
|
||||
}
|
||||
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
//***************************************************************************
|
||||
/// Copy constructor.
|
||||
//***************************************************************************
|
||||
@ -144,6 +145,7 @@ namespace etl
|
||||
storage.construct(other.value());
|
||||
}
|
||||
}
|
||||
#include "etl/private/diagnostic_pop.h"
|
||||
|
||||
#if ETL_USING_CPP11
|
||||
//***************************************************************************
|
||||
|
||||
@ -457,7 +457,7 @@ namespace etl
|
||||
|
||||
const bool OK = (sizeof(T) * CHAR_BIT) >= (Number_Of_Elements * Bits_Per_Element);
|
||||
|
||||
ETL_ASSERT_AND_RETURN_VALUE(OK, ETL_ERROR(etl::bitset_type_too_small), T(0));
|
||||
ETL_ASSERT_OR_RETURN_VALUE(OK, ETL_ERROR(etl::bitset_type_too_small), T(0));
|
||||
|
||||
if (OK)
|
||||
{
|
||||
@ -1170,7 +1170,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
bitset<MaxN>& set(const char* text)
|
||||
{
|
||||
ETL_ASSERT_AND_RETURN_VALUE(text != 0, ETL_ERROR(bitset_nullptr), *this);
|
||||
ETL_ASSERT_OR_RETURN_VALUE(text != 0, ETL_ERROR(bitset_nullptr), *this);
|
||||
etl::ibitset::set(text);
|
||||
|
||||
return *this;
|
||||
@ -1181,7 +1181,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
bitset<MaxN>& set(const wchar_t* text)
|
||||
{
|
||||
ETL_ASSERT_AND_RETURN_VALUE(text != 0, ETL_ERROR(bitset_nullptr), *this);
|
||||
ETL_ASSERT_OR_RETURN_VALUE(text != 0, ETL_ERROR(bitset_nullptr), *this);
|
||||
etl::ibitset::set(text);
|
||||
|
||||
return *this;
|
||||
@ -1192,7 +1192,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
bitset<MaxN>& set(const char16_t* text)
|
||||
{
|
||||
ETL_ASSERT_AND_RETURN_VALUE(text != 0, ETL_ERROR(bitset_nullptr), *this);
|
||||
ETL_ASSERT_OR_RETURN_VALUE(text != 0, ETL_ERROR(bitset_nullptr), *this);
|
||||
etl::ibitset::set(text);
|
||||
|
||||
return *this;
|
||||
@ -1203,7 +1203,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
bitset<MaxN>& set(const char32_t* text)
|
||||
{
|
||||
ETL_ASSERT_AND_RETURN_VALUE(text != 0, ETL_ERROR(bitset_nullptr), *this);
|
||||
ETL_ASSERT_OR_RETURN_VALUE(text != 0, ETL_ERROR(bitset_nullptr), *this);
|
||||
etl::ibitset::set(text);
|
||||
|
||||
return *this;
|
||||
@ -1312,7 +1312,7 @@ namespace etl
|
||||
|
||||
result.resize(MaxN, '\0');
|
||||
|
||||
ETL_ASSERT_AND_RETURN_VALUE((result.size() == MaxN), ETL_ERROR(etl::bitset_overflow), result);
|
||||
ETL_ASSERT_OR_RETURN_VALUE((result.size() == MaxN), ETL_ERROR(etl::bitset_overflow), result);
|
||||
|
||||
for (size_t i = MaxN; i > 0; --i)
|
||||
{
|
||||
|
||||
@ -565,7 +565,7 @@ namespace etl
|
||||
result.resize(active_bits, '\0');
|
||||
|
||||
// Check that the string type can contain the digits.
|
||||
ETL_ASSERT_AND_RETURN_VALUE(result.size() == active_bits, ETL_ERROR(etl::bitset_string_too_small), result);
|
||||
ETL_ASSERT_OR_RETURN_VALUE(result.size() == active_bits, ETL_ERROR(etl::bitset_string_too_small), result);
|
||||
|
||||
for (size_t i = active_bits; i > 0; --i)
|
||||
{
|
||||
@ -1429,7 +1429,7 @@ namespace etl
|
||||
result.resize(Active_Bits, '\0');
|
||||
|
||||
// Check that the string type can contain the digits.
|
||||
ETL_ASSERT_AND_RETURN_VALUE(result.size() == Active_Bits, ETL_ERROR(etl::bitset_string_too_small), result);
|
||||
ETL_ASSERT_OR_RETURN_VALUE(result.size() == Active_Bits, ETL_ERROR(etl::bitset_string_too_small), result);
|
||||
|
||||
for (size_t i = Active_Bits; i > 0; --i)
|
||||
{
|
||||
@ -3078,7 +3078,7 @@ namespace etl
|
||||
result.resize(Active_Bits, '\0');
|
||||
|
||||
// Check that the string type can contain the digits.
|
||||
ETL_ASSERT_AND_RETURN_VALUE(result.size() == Active_Bits, ETL_ERROR(etl::bitset_string_too_small), result);
|
||||
ETL_ASSERT_OR_RETURN_VALUE(result.size() == Active_Bits, ETL_ERROR(etl::bitset_string_too_small), result);
|
||||
|
||||
for (size_t i = Active_Bits; i > 0; --i)
|
||||
{
|
||||
|
||||
@ -185,7 +185,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
void resize(size_t new_size)
|
||||
{
|
||||
ETL_ASSERT(new_size <= CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN(new_size <= CAPACITY, ETL_ERROR(vector_full));
|
||||
|
||||
p_end = p_buffer + new_size;
|
||||
}
|
||||
@ -199,7 +199,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
void resize(size_t new_size, value_type value)
|
||||
{
|
||||
ETL_ASSERT(new_size <= CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN(new_size <= CAPACITY, ETL_ERROR(vector_full));
|
||||
|
||||
pointer p_new_end = p_buffer + new_size;
|
||||
|
||||
@ -218,7 +218,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
void uninitialized_resize(size_t new_size)
|
||||
{
|
||||
ETL_ASSERT(new_size <= CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN(new_size <= CAPACITY, ETL_ERROR(vector_full));
|
||||
|
||||
p_end = p_buffer + new_size;
|
||||
}
|
||||
@ -334,7 +334,7 @@ namespace etl
|
||||
{
|
||||
#if ETL_IS_DEBUG_BUILD
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(static_cast<size_t>(d) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN(static_cast<size_t>(d) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
#endif
|
||||
|
||||
initialise();
|
||||
@ -359,7 +359,7 @@ namespace etl
|
||||
{
|
||||
#if ETL_IS_DEBUG_BUILD
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(static_cast<size_t>(d) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN(static_cast<size_t>(d) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
#endif
|
||||
|
||||
initialise();
|
||||
@ -378,7 +378,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
void assign(size_t n, value_type value)
|
||||
{
|
||||
ETL_ASSERT(n <= CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN(n <= CAPACITY, ETL_ERROR(vector_full));
|
||||
|
||||
initialise();
|
||||
|
||||
@ -401,7 +401,7 @@ namespace etl
|
||||
void push_back(value_type value)
|
||||
{
|
||||
#if defined(ETL_CHECK_PUSH_POP)
|
||||
ETL_ASSERT(size() != CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN(size() != CAPACITY, ETL_ERROR(vector_full));
|
||||
#endif
|
||||
*p_end++ = value;
|
||||
}
|
||||
@ -414,7 +414,7 @@ namespace etl
|
||||
void emplace_back(value_type value)
|
||||
{
|
||||
#if defined(ETL_CHECK_PUSH_POP)
|
||||
ETL_ASSERT(size() != CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN(size() != CAPACITY, ETL_ERROR(vector_full));
|
||||
#endif
|
||||
* p_end++ = value;
|
||||
}
|
||||
@ -426,7 +426,7 @@ namespace etl
|
||||
void pop_back()
|
||||
{
|
||||
#if defined(ETL_CHECK_PUSH_POP)
|
||||
ETL_ASSERT(size() > 0, ETL_ERROR(vector_empty));
|
||||
ETL_ASSERT_OR_RETURN(size() > 0, ETL_ERROR(vector_empty));
|
||||
#endif
|
||||
--p_end;
|
||||
}
|
||||
@ -496,7 +496,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
void insert(const_iterator position, size_t n, value_type value)
|
||||
{
|
||||
ETL_ASSERT((size() + n) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN((size() + n) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
|
||||
iterator position_ = to_iterator(position);
|
||||
|
||||
@ -521,7 +521,7 @@ namespace etl
|
||||
|
||||
iterator position_ = to_iterator(position);
|
||||
|
||||
ETL_ASSERT((size() + count) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN((size() + count) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
|
||||
etl::copy_backward(position_, p_end, p_end + count);
|
||||
etl::copy(first, last, position_);
|
||||
|
||||
@ -145,22 +145,6 @@ SOFTWARE.
|
||||
#define ETL_CPP20_NOT_SUPPORTED (!ETL_CPP20_SUPPORTED)
|
||||
#define ETL_CPP23_NOT_SUPPORTED (!ETL_CPP23_SUPPORTED)
|
||||
|
||||
#if !defined(ETL_NO_NULLPTR_SUPPORT)
|
||||
#define ETL_NO_NULLPTR_SUPPORT ETL_CPP11_NOT_SUPPORTED
|
||||
#endif
|
||||
|
||||
#if !defined(ETL_NO_SMALL_CHAR_SUPPORT)
|
||||
#define ETL_NO_SMALL_CHAR_SUPPORT ETL_CPP20_NOT_SUPPORTED
|
||||
#endif
|
||||
|
||||
#if !defined(ETL_NO_LARGE_CHAR_SUPPORT)
|
||||
#define ETL_NO_LARGE_CHAR_SUPPORT ETL_CPP11_NOT_SUPPORTED
|
||||
#endif
|
||||
|
||||
#if !defined(ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED)
|
||||
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED ETL_CPP14_SUPPORTED
|
||||
#endif
|
||||
|
||||
// 'Using' macros
|
||||
#define ETL_USING_CPP11 (ETL_CPP11_SUPPORTED == 1)
|
||||
#define ETL_USING_CPP14 (ETL_CPP14_SUPPORTED == 1)
|
||||
@ -174,6 +158,26 @@ SOFTWARE.
|
||||
#define ETL_NOT_USING_CPP20 (ETL_CPP20_SUPPORTED == 0)
|
||||
#define ETL_NOT_USING_CPP23 (ETL_CPP23_SUPPORTED == 0)
|
||||
|
||||
#if !defined(ETL_NO_NULLPTR_SUPPORT)
|
||||
#define ETL_NO_NULLPTR_SUPPORT ETL_NOT_USING_CPP11
|
||||
#endif
|
||||
|
||||
#if !defined(ETL_NO_SMALL_CHAR_SUPPORT)
|
||||
#if ETL_USING_CPP20
|
||||
#define ETL_NO_SMALL_CHAR_SUPPORT 0
|
||||
#else
|
||||
#define ETL_NO_SMALL_CHAR_SUPPORT 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(ETL_NO_LARGE_CHAR_SUPPORT)
|
||||
#define ETL_NO_LARGE_CHAR_SUPPORT ETL_NOT_USING_CPP11
|
||||
#endif
|
||||
|
||||
#if !defined(ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED)
|
||||
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED ETL_USING_CPP14
|
||||
#endif
|
||||
|
||||
// Language standard
|
||||
#if ETL_USING_CPP23
|
||||
#define ETL_LANGUAGE_STANDARD 23
|
||||
|
||||
@ -89,7 +89,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Move constructor
|
||||
//*************************************************************************
|
||||
shared_message(etl::shared_message&& other)
|
||||
shared_message(etl::shared_message&& other) ETL_NOEXCEPT
|
||||
: p_rcmessage(etl::move(other.p_rcmessage))
|
||||
{
|
||||
other.p_rcmessage = ETL_NULLPTR;
|
||||
@ -121,7 +121,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Move assignment operator
|
||||
//*************************************************************************
|
||||
shared_message& operator =(etl::shared_message&& other)
|
||||
shared_message& operator =(etl::shared_message&& other) ETL_NOEXCEPT
|
||||
{
|
||||
if (&other != this)
|
||||
{
|
||||
|
||||
@ -221,7 +221,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
void resize(size_t new_size, const_reference value)
|
||||
{
|
||||
ETL_ASSERT(new_size <= CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN(new_size <= CAPACITY, ETL_ERROR(vector_full));
|
||||
|
||||
const size_t current_size = size();
|
||||
size_t delta = (current_size < new_size) ? new_size - current_size : current_size - new_size;
|
||||
@ -246,7 +246,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
void uninitialized_resize(size_t new_size)
|
||||
{
|
||||
ETL_ASSERT(new_size <= CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN(new_size <= CAPACITY, ETL_ERROR(vector_full));
|
||||
|
||||
#if defined(ETL_DEBUG_COUNT)
|
||||
if (size() < new_size)
|
||||
@ -383,7 +383,7 @@ namespace etl
|
||||
|
||||
#if ETL_IS_DEBUG_BUILD
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(static_cast<size_t>(d) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN(static_cast<size_t>(d) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
#endif
|
||||
|
||||
initialise();
|
||||
@ -400,7 +400,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
void assign(size_t n, parameter_t value)
|
||||
{
|
||||
ETL_ASSERT(n <= CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN(n <= CAPACITY, ETL_ERROR(vector_full));
|
||||
|
||||
initialise();
|
||||
|
||||
@ -432,7 +432,7 @@ namespace etl
|
||||
void push_back(const_reference value)
|
||||
{
|
||||
#if defined(ETL_CHECK_PUSH_POP)
|
||||
ETL_ASSERT(size() != CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN(size() != CAPACITY, ETL_ERROR(vector_full));
|
||||
#endif
|
||||
create_back(value);
|
||||
}
|
||||
@ -446,7 +446,7 @@ namespace etl
|
||||
void push_back(rvalue_reference value)
|
||||
{
|
||||
#if defined(ETL_CHECK_PUSH_POP)
|
||||
ETL_ASSERT(size() != CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN(size() != CAPACITY, ETL_ERROR(vector_full));
|
||||
#endif
|
||||
create_back(etl::move(value));
|
||||
}
|
||||
@ -546,7 +546,7 @@ namespace etl
|
||||
void pop_back()
|
||||
{
|
||||
#if defined(ETL_CHECK_PUSH_POP)
|
||||
ETL_ASSERT(size() > 0, ETL_ERROR(vector_empty));
|
||||
ETL_ASSERT_OR_RETURN(size() > 0, ETL_ERROR(vector_empty));
|
||||
#endif
|
||||
destroy_back();
|
||||
}
|
||||
@ -754,7 +754,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
void insert(const_iterator position, size_t n, parameter_t value)
|
||||
{
|
||||
ETL_ASSERT((size() + n) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN((size() + n) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
|
||||
iterator position_ = to_iterator(position);
|
||||
|
||||
@ -813,7 +813,7 @@ namespace etl
|
||||
{
|
||||
size_t count = etl::distance(first, last);
|
||||
|
||||
ETL_ASSERT((size() + count) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
ETL_ASSERT_OR_RETURN((size() + count) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
|
||||
size_t insert_n = count;
|
||||
size_t insert_begin = etl::distance(cbegin(), position);
|
||||
@ -1335,7 +1335,7 @@ namespace etl
|
||||
ETL_OVERRIDE
|
||||
#endif
|
||||
{
|
||||
ETL_ASSERT(etl::is_trivially_copyable<T>::value, ETL_ERROR(etl::vector_incompatible_type));
|
||||
ETL_ASSERT_OR_RETURN(etl::is_trivially_copyable<T>::value, ETL_ERROR(etl::vector_incompatible_type));
|
||||
|
||||
etl::ivector<T>::repair_buffer(buffer);
|
||||
}
|
||||
|
||||
@ -1,6 +1,15 @@
|
||||
cmake_minimum_required(VERSION 3.5.0)
|
||||
project(etl_unit_tests LANGUAGES CXX)
|
||||
|
||||
#include(FetchContent)
|
||||
#FetchContent_Declare(
|
||||
# googletest
|
||||
# URL https://github.com/google/googletest/archive/refs/heads/main.zip
|
||||
#)
|
||||
|
||||
#set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
#FetchContent_MakeAvailable(googletest)
|
||||
|
||||
add_executable(etl_tests
|
||||
main.cpp
|
||||
murmurhash3.cpp
|
||||
@ -40,7 +49,6 @@ add_executable(etl_tests
|
||||
test_circular_buffer_external_buffer.cpp
|
||||
test_circular_iterator.cpp
|
||||
test_compare.cpp
|
||||
test_compiler_settings.cpp
|
||||
test_constant.cpp
|
||||
test_container.cpp
|
||||
test_correlation.cpp
|
||||
@ -276,6 +284,26 @@ target_compile_definitions(etl_tests PRIVATE -DETL_DEBUG)
|
||||
|
||||
option(ETL_NO_STL "No STL" OFF)
|
||||
|
||||
if (ETL_CXX_STANDARD MATCHES "98")
|
||||
message(STATUS "Compiling for C++98")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 98)
|
||||
elseif (ETL_CXX_STANDARD MATCHES "03")
|
||||
message(STATUS "Compiling for C++98")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 98)
|
||||
elseif (ETL_CXX_STANDARD MATCHES "11")
|
||||
message(STATUS "Compiling for C++11")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 11)
|
||||
elseif (ETL_CXX_STANDARD MATCHES "14")
|
||||
message(STATUS "Compiling for C++14")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 14)
|
||||
elseif (ETL_CXX_STANDARD MATCHES "17")
|
||||
message(STATUS "Compiling for C++17")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 17)
|
||||
else()
|
||||
message(STATUS "Compiling for C++20")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 20)
|
||||
endif()
|
||||
|
||||
if (NO_STL OR ETL_NO_STL)
|
||||
message(STATUS "Compiling for No STL")
|
||||
target_compile_definitions(etl_tests PRIVATE -DETL_NO_STL)
|
||||
@ -343,5 +371,4 @@ add_test(etl_unit_tests etl_tests)
|
||||
# as they appear from UnitTest++
|
||||
add_custom_target(test_verbose COMMAND ${CMAKE_CTEST_COMMAND} --verbose)
|
||||
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 17)
|
||||
|
||||
@ -341,5 +341,16 @@ if (caught_) \
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define CHECK_MESSAGE(m1) std::cerr << (m1) << "\n";
|
||||
#define CHECK_MESSAGE1(m1) std::cerr << (m1) << "\n";
|
||||
#define CHECK_MESSAGE2(m1, m2) std::cerr << (m1) << (m2) << "\n";
|
||||
#define CHECK_MESSAGE3(m1, m2, m3) std::cerr << (m1) << (m2) << (m3) << "\n";
|
||||
#define CHECK_MESSAGE4(m1, m2, m3, m4) std::cerr << (m1) << (m2) << (m3) << (m4) << "\n";
|
||||
|
||||
#define CHECK_MESSAGE_IF(b, m1) { if (b) std::cerr << (m1) << "\n"; }
|
||||
#define CHECK_MESSAGE1_IF(m1) { if (b) std::cerr << (m1) << "\n"; }
|
||||
#define CHECK_MESSAGE2_IF(m1, m2) { if (b) std::cerr << (m1) << (m2) << "\n"; }
|
||||
#define CHECK_MESSAGE3_IF(m1, m2, m3) { if (b) std::cerr << (m1) << (m2) << (m3) << "\n"; }
|
||||
#define CHECK_MESSAGE4_IF(m1, m2, m3, m4) { if (b) std::cerr << (m1) << (m2) << (m3) << (m4) << "\n"; }
|
||||
#endif
|
||||
|
||||
|
||||
@ -16,8 +16,146 @@
|
||||
#include "MemoryOutStream.h"
|
||||
#include<iomanip>
|
||||
|
||||
namespace UnitTest {
|
||||
namespace UnitTest
|
||||
{
|
||||
template <typename TChar>
|
||||
typename std::enable_if<!std::is_pointer<TChar>::value, std::string>::type
|
||||
DisplayValue(const TChar& c)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
||||
oss << c;
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
template <>
|
||||
inline std::string DisplayValue(const char& c)
|
||||
{
|
||||
using type = std::char_traits<char>::int_type;
|
||||
|
||||
std::ostringstream oss;
|
||||
|
||||
oss << type(c) << " ('" << c << "')";
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
#if (__cplusplus >= 202002L)
|
||||
template <>
|
||||
inline std::string DisplayValue(const char8_t& c)
|
||||
{
|
||||
using type = std::char_traits<char8_t>::int_type;
|
||||
|
||||
std::ostringstream oss;
|
||||
|
||||
oss << type(c);
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
#endif
|
||||
|
||||
template <>
|
||||
inline std::string DisplayValue(const wchar_t& c)
|
||||
{
|
||||
using type = std::char_traits<wchar_t>::int_type;
|
||||
|
||||
std::ostringstream oss;
|
||||
|
||||
oss << type(c);
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
#if (__cplusplus >= 201103L)
|
||||
template <>
|
||||
inline std::string DisplayValue(const char16_t& c)
|
||||
{
|
||||
using type = std::char_traits<char16_t>::int_type;
|
||||
|
||||
std::ostringstream oss;
|
||||
|
||||
oss << type(c);
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
template <>
|
||||
inline std::string DisplayValue(const char32_t& c)
|
||||
{
|
||||
using type = std::char_traits<char32_t>::int_type;
|
||||
|
||||
std::ostringstream oss;
|
||||
|
||||
oss << type(c);
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename TChar>
|
||||
std::string DisplayValue(const TChar* c)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
||||
oss << c;
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
template <>
|
||||
inline std::string DisplayValue(const char* c)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
||||
oss << c;
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
#if (__cplusplus >= 202002L)
|
||||
template <>
|
||||
inline std::string DisplayValue(const char8_t* c)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
||||
oss << static_cast<const void*>(c);
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
#endif
|
||||
|
||||
template <>
|
||||
inline std::string DisplayValue(const wchar_t* c)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
||||
oss << static_cast<const void*>(c);
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
#if (__cplusplus >= 201103L)
|
||||
template <>
|
||||
inline std::string DisplayValue(const char16_t* c)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
||||
oss << static_cast<const void*>(c);
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
template <>
|
||||
inline std::string DisplayValue(const char32_t* c)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
||||
oss << static_cast<const void*>(c);
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
#endif
|
||||
|
||||
template< typename Value >
|
||||
bool Check(Value const& value)
|
||||
@ -31,55 +169,18 @@ namespace UnitTest {
|
||||
return !value;
|
||||
}
|
||||
|
||||
#if __cplusplus >= 202002L
|
||||
template< typename Expected, typename Actual >
|
||||
std::enable_if_t<!(std::is_same_v<wchar_t, std::remove_cvref_t<std::remove_pointer_t<Expected>>> || std::is_same_v<wchar_t, std::remove_cvref_t<std::remove_pointer_t<Actual>>> ||
|
||||
|
||||
std::is_same_v<char8_t, std::remove_cvref_t<std::remove_pointer_t<Expected>>> || std::is_same_v<char8_t, std::remove_cvref_t<std::remove_pointer_t<Actual>>> ||
|
||||
std::is_same_v<char16_t, std::remove_cvref_t<std::remove_pointer_t<Expected>>> || std::is_same_v<char16_t, std::remove_cvref_t<std::remove_pointer_t<Actual>>> ||
|
||||
std::is_same_v<char32_t, std::remove_cvref_t<std::remove_pointer_t<Expected>>> || std::is_same_v<char32_t, std::remove_cvref_t<std::remove_pointer_t<Actual>>>), void>
|
||||
CheckEqual(TestResults& results, Expected const& expected, Actual const& actual, TestDetails const& details)
|
||||
{
|
||||
if (!(expected == actual))
|
||||
{
|
||||
UnitTest::MemoryOutStream stream;
|
||||
stream << "Expected " << expected << " but was " << actual;
|
||||
|
||||
results.OnTestFailure(details, stream.GetText());
|
||||
}
|
||||
}
|
||||
|
||||
template< typename Expected, typename Actual >
|
||||
std::enable_if_t<(std::is_same_v<wchar_t, std::remove_cvref_t<std::remove_pointer_t<Expected>>> || std::is_same_v<wchar_t, std::remove_cvref_t<std::remove_pointer_t<Actual>>> ||
|
||||
std::is_same_v<char8_t, std::remove_cvref_t<std::remove_pointer_t<Expected>>> || std::is_same_v<char8_t, std::remove_cvref_t<std::remove_pointer_t<Actual>>> ||
|
||||
std::is_same_v<char16_t, std::remove_cvref_t<std::remove_pointer_t<Expected>>> || std::is_same_v<char16_t, std::remove_cvref_t<std::remove_pointer_t<Actual>>> ||
|
||||
std::is_same_v<char32_t, std::remove_cvref_t<std::remove_pointer_t<Expected>>> || std::is_same_v<char32_t, std::remove_cvref_t<std::remove_pointer_t<Actual>>>), void>
|
||||
CheckEqual(TestResults& results, Expected const& expected, Actual const& actual, TestDetails const& details)
|
||||
{
|
||||
if (!(expected == actual))
|
||||
{
|
||||
using int_type_expected = std::char_traits<Expected>::int_type;
|
||||
using int_type_actual = std::char_traits<Actual>::int_type;
|
||||
|
||||
UnitTest::MemoryOutStream stream;
|
||||
stream << "Expected " << int_type_expected(expected) << " but was " << int_type_actual(actual);
|
||||
|
||||
results.OnTestFailure(details, stream.GetText());
|
||||
}
|
||||
}
|
||||
#else
|
||||
template< typename Expected, typename Actual >
|
||||
void CheckEqual(TestResults& results, Expected const& expected, Actual const& actual, TestDetails const& details)
|
||||
{
|
||||
if (!(expected == actual))
|
||||
{
|
||||
UnitTest::MemoryOutStream stream;
|
||||
stream << "Expected " << expected << " but was " << actual;
|
||||
stream << "Expected "
|
||||
<< DisplayValue(expected) << " but was " << DisplayValue(actual);
|
||||
|
||||
results.OnTestFailure(details, stream.GetText());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
template< typename Expected, typename Actual >
|
||||
void CheckEqualHex(TestResults& results, Expected const& expected, Actual const& actual, TestDetails const& details)
|
||||
@ -144,59 +245,6 @@ namespace UnitTest {
|
||||
}
|
||||
}
|
||||
|
||||
#if __cplusplus >= 202002L
|
||||
template< typename Expected, typename Actual >
|
||||
void CheckArrayEqual(TestResults& results, Expected const& expected, Actual const& actual,
|
||||
size_t const count, TestDetails const& details)
|
||||
{
|
||||
bool equal = true;
|
||||
for (size_t i = 0; i < count; ++i)
|
||||
equal &= (expected[i] == actual[i]);
|
||||
|
||||
if (!equal)
|
||||
{
|
||||
UnitTest::MemoryOutStream stream;
|
||||
|
||||
stream << "Expected [ ";
|
||||
|
||||
using expected_type = std::remove_cvref_t<decltype(expected[0])>;
|
||||
using actual_type = std::remove_cvref_t<decltype(actual[0])>;
|
||||
|
||||
if constexpr (std::is_same_v<wchar_t, expected_type> || std::is_same_v<wchar_t, actual_type> ||
|
||||
std::is_same_v<char8_t, expected_type> || std::is_same_v<char8_t, actual_type> ||
|
||||
std::is_same_v<char16_t, expected_type> || std::is_same_v<char16_t, actual_type> ||
|
||||
std::is_same_v<char32_t, expected_type> || std::is_same_v<char32_t, actual_type>)
|
||||
{
|
||||
using int_type_expected = std::char_traits<expected_type>::int_type;
|
||||
using int_type_actual = std::char_traits<actual_type>::int_type;
|
||||
|
||||
for (size_t expectedIndex = 0; expectedIndex < count; ++expectedIndex)
|
||||
stream << int_type_expected(expected[expectedIndex]) << " ";
|
||||
|
||||
stream << "] but was [ ";
|
||||
|
||||
for (size_t actualIndex = 0; actualIndex < count; ++actualIndex)
|
||||
stream << int_type_actual(actual[actualIndex]) << " ";
|
||||
|
||||
stream << "]";
|
||||
}
|
||||
else
|
||||
{
|
||||
for (size_t expectedIndex = 0; expectedIndex < count; ++expectedIndex)
|
||||
stream << expected[expectedIndex] << " ";
|
||||
|
||||
stream << "] but was [ ";
|
||||
|
||||
for (size_t actualIndex = 0; actualIndex < count; ++actualIndex)
|
||||
stream << actual[actualIndex] << " ";
|
||||
|
||||
stream << "]";
|
||||
}
|
||||
|
||||
results.OnTestFailure(details, stream.GetText());
|
||||
}
|
||||
}
|
||||
#else
|
||||
template< typename Expected, typename Actual >
|
||||
void CheckArrayEqual(TestResults& results, Expected const& expected, Actual const& actual,
|
||||
size_t const count, TestDetails const& details)
|
||||
@ -212,19 +260,18 @@ namespace UnitTest {
|
||||
stream << "Expected [ ";
|
||||
|
||||
for (size_t expectedIndex = 0; expectedIndex < count; ++expectedIndex)
|
||||
stream << expected[expectedIndex] << " ";
|
||||
stream << DisplayValue(expected[expectedIndex]) << " ";
|
||||
|
||||
stream << "] but was [ ";
|
||||
|
||||
for (size_t actualIndex = 0; actualIndex < count; ++actualIndex)
|
||||
stream << actual[actualIndex] << " ";
|
||||
stream << DisplayValue(actual[actualIndex]) << " ";
|
||||
|
||||
stream << "]";
|
||||
|
||||
results.OnTestFailure(details, stream.GetText());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
template< typename Expected, typename Actual, typename Tolerance >
|
||||
bool ArrayAreClose(Expected const& expected, Actual const& actual, size_t const count, Tolerance const& tolerance)
|
||||
|
||||
@ -14,6 +14,26 @@ add_executable(etl_tests
|
||||
${TEST_SOURCE_FILES}
|
||||
)
|
||||
|
||||
if (ETL_CXX_STANDARD MATCHES "98")
|
||||
message(STATUS "Compiling for C++98")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 98)
|
||||
elseif (ETL_CXX_STANDARD MATCHES "03")
|
||||
message(STATUS "Compiling for C++98")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 98)
|
||||
elseif (ETL_CXX_STANDARD MATCHES "11")
|
||||
message(STATUS "Compiling for C++11")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 11)
|
||||
elseif (ETL_CXX_STANDARD MATCHES "14")
|
||||
message(STATUS "Compiling for C++14")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 14)
|
||||
elseif (ETL_CXX_STANDARD MATCHES "17")
|
||||
message(STATUS "Compiling for C++17")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 17)
|
||||
else()
|
||||
message(STATUS "Compiling for C++20")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 20)
|
||||
endif()
|
||||
|
||||
if (ETL_OPTIMISATION MATCHES "-O1")
|
||||
message(STATUS "Compiling with -O1 optimisations")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1")
|
||||
@ -41,7 +61,7 @@ if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Cla
|
||||
-fno-omit-frame-pointer
|
||||
-Wall
|
||||
-Wextra
|
||||
-Werror
|
||||
-Werror
|
||||
)
|
||||
target_link_options(etl_tests
|
||||
PRIVATE
|
||||
@ -58,6 +78,3 @@ add_test(etl_error_handler_unit_tests etl_tests)
|
||||
add_custom_target(test_verbose COMMAND ${CMAKE_CTEST_COMMAND} --verbose)
|
||||
|
||||
|
||||
#RSG
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 17)
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ void AssertFail()
|
||||
//*****************************************************************************
|
||||
void AssertAndReturn(bool state)
|
||||
{
|
||||
ETL_ASSERT_AND_RETURN(state, ETL_ERROR(test_exception_1));
|
||||
ETL_ASSERT_OR_RETURN(state, ETL_ERROR(test_exception_1));
|
||||
|
||||
++return_count;
|
||||
}
|
||||
@ -88,7 +88,7 @@ void AssertFailAndReturn()
|
||||
//*****************************************************************************
|
||||
bool AssertAndReturnValue(bool state)
|
||||
{
|
||||
ETL_ASSERT_AND_RETURN_VALUE(state, ETL_ERROR(test_exception_1), true);
|
||||
ETL_ASSERT_OR_RETURN_VALUE(state, ETL_ERROR(test_exception_1), true);
|
||||
|
||||
++return_count;
|
||||
return false;
|
||||
|
||||
@ -14,6 +14,26 @@ add_executable(etl_tests
|
||||
${TEST_SOURCE_FILES}
|
||||
)
|
||||
|
||||
if (ETL_CXX_STANDARD MATCHES "98")
|
||||
message(STATUS "Compiling for C++98")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 98)
|
||||
elseif (ETL_CXX_STANDARD MATCHES "03")
|
||||
message(STATUS "Compiling for C++98")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 98)
|
||||
elseif (ETL_CXX_STANDARD MATCHES "11")
|
||||
message(STATUS "Compiling for C++11")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 11)
|
||||
elseif (ETL_CXX_STANDARD MATCHES "14")
|
||||
message(STATUS "Compiling for C++14")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 14)
|
||||
elseif (ETL_CXX_STANDARD MATCHES "17")
|
||||
message(STATUS "Compiling for C++17")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 17)
|
||||
else()
|
||||
message(STATUS "Compiling for C++20")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 20)
|
||||
endif()
|
||||
|
||||
if (ETL_OPTIMISATION MATCHES "-O1")
|
||||
message(STATUS "Compiling with -O1 optimisations")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1")
|
||||
|
||||
@ -88,7 +88,7 @@ void AssertFail()
|
||||
//*****************************************************************************
|
||||
void AssertAndReturn(bool state)
|
||||
{
|
||||
ETL_ASSERT_AND_RETURN(state, ETL_ERROR(test_exception_1));
|
||||
ETL_ASSERT_OR_RETURN(state, ETL_ERROR(test_exception_1));
|
||||
|
||||
++assert_return_count;
|
||||
}
|
||||
@ -104,7 +104,7 @@ void AssertFailAndReturn()
|
||||
//*****************************************************************************
|
||||
bool AssertAndReturnValue(bool state)
|
||||
{
|
||||
ETL_ASSERT_AND_RETURN_VALUE(state, ETL_ERROR(test_exception_1), true);
|
||||
ETL_ASSERT_OR_RETURN_VALUE(state, ETL_ERROR(test_exception_1), true);
|
||||
|
||||
++assert_return_count;
|
||||
return false;
|
||||
|
||||
@ -15,6 +15,26 @@ add_executable(etl_tests
|
||||
${TEST_SOURCE_FILES}
|
||||
)
|
||||
|
||||
if (ETL_CXX_STANDARD MATCHES "98")
|
||||
message(STATUS "Compiling for C++98")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 98)
|
||||
elseif (ETL_CXX_STANDARD MATCHES "03")
|
||||
message(STATUS "Compiling for C++98")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 98)
|
||||
elseif (ETL_CXX_STANDARD MATCHES "11")
|
||||
message(STATUS "Compiling for C++11")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 11)
|
||||
elseif (ETL_CXX_STANDARD MATCHES "14")
|
||||
message(STATUS "Compiling for C++14")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 14)
|
||||
elseif (ETL_CXX_STANDARD MATCHES "17")
|
||||
message(STATUS "Compiling for C++17")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 17)
|
||||
else()
|
||||
message(STATUS "Compiling for C++20")
|
||||
set_property(TARGET etl_tests PROPERTY CXX_STANDARD 20)
|
||||
endif()
|
||||
|
||||
if (ETL_OPTIMISATION MATCHES "-O1")
|
||||
message(STATUS "Compiling with -O1 optimisations")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1")
|
||||
|
||||
@ -89,7 +89,7 @@ void AssertFail()
|
||||
//*****************************************************************************
|
||||
void AssertAndReturn(bool state)
|
||||
{
|
||||
ETL_ASSERT_AND_RETURN(state, ETL_ERROR(test_exception_1));
|
||||
ETL_ASSERT_OR_RETURN(state, ETL_ERROR(test_exception_1));
|
||||
|
||||
++return_count;
|
||||
}
|
||||
@ -105,7 +105,7 @@ void AssertFailAndReturn()
|
||||
//*****************************************************************************
|
||||
bool AssertAndReturnValue(bool state)
|
||||
{
|
||||
ETL_ASSERT_AND_RETURN_VALUE(state, ETL_ERROR(test_exception_1), true);
|
||||
ETL_ASSERT_OR_RETURN_VALUE(state, ETL_ERROR(test_exception_1), true);
|
||||
|
||||
++return_count;
|
||||
return false;
|
||||
|
||||
348
test/runtests-c++14.sh
Normal file
348
test/runtests-c++14.sh
Normal file
@ -0,0 +1,348 @@
|
||||
#!/bin/sh
|
||||
clear
|
||||
|
||||
mkdir -p build-make || exit 1
|
||||
cd build-make || exit 1
|
||||
|
||||
echo "ETL Tests" > log.txt
|
||||
|
||||
opt="-O0"
|
||||
cxx_standard="14"
|
||||
|
||||
#******************************************************************************
|
||||
# GCC
|
||||
#******************************************************************************
|
||||
echo ""
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
echo " GCC - STL" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
rm * -rf
|
||||
gcc --version | grep gcc | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="g++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Compilation >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
./etl_tests
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Tests >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
echo ""
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
echo " GCC - STL - Force C++03" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
rm * -rf
|
||||
gcc --version | grep gcc | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="g++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Compilation >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
./etl_tests
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Tests >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
echo ""
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
echo " GCC - No STL" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
rm * -rf
|
||||
gcc --version | grep gcc | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="g++" -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Compilation >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
./etl_tests
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Tests >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
|
||||
#******************************************************************************
|
||||
# CLANG
|
||||
#******************************************************************************
|
||||
echo ""
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
echo " Clang - STL" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
rm * -rf
|
||||
clang --version | grep clang | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="clang++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Compilation >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
./etl_tests
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Tests >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
echo ""
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
echo " Clang - STL - Force C++03" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
rm * -rf
|
||||
clang --version | grep clang | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="clang++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Compilation >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
./etl_tests
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Tests >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
echo ""
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
echo " Clang - No STL" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
rm * -rf
|
||||
clang --version | grep clang | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="clang++" -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Compilation >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
./etl_tests
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Tests >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
echo " GCC - Initializer list test" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
cd ../etl_initializer_list/
|
||||
mkdir -p build-make || exit 1
|
||||
cd build-make || exit 1
|
||||
rm * -rf
|
||||
gcc --version | grep gcc | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed initializer_list Compilation >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed initializer_list ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
./etl_tests
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Tests >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
echo " Clang - Initializer list test" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
rm * -rf
|
||||
clang --version | grep clang | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed initializer_list Compilation >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed initializer_list ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
./etl_tests
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Tests >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
echo " GCC - Error macros 'log_errors' test" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
cd ../../etl_error_handler/log_errors
|
||||
mkdir -p build-make || exit 1
|
||||
cd build-make || exit 1
|
||||
rm * -rf
|
||||
gcc --version | grep gcc | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Error macros 'log_errors' Compilation >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed Error macros 'log_errors' ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
./etl_tests
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Tests >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed Error macros 'log_errors' ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
echo " GCC - Error macros 'exceptions' test" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
cd ../../../etl_error_handler/exceptions
|
||||
mkdir -p build-make || exit 1
|
||||
cd build-make || exit 1
|
||||
rm * -rf
|
||||
gcc --version | grep gcc | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Error macros 'exceptions' Compilation >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed Error macros 'exceptions' ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
./etl_tests
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Tests >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed Error macros 'exceptions' ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
echo " GCC - Error macros 'log_errors and exceptions' test" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
cd ../../../etl_error_handler/log_errors_and_exceptions
|
||||
mkdir -p build-make || exit 1
|
||||
cd build-make || exit 1
|
||||
rm * -rf
|
||||
gcc --version | grep gcc | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Error macros 'log_errors and exceptions' Compilation >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed Error macros 'log_errors and exceptions' ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
./etl_tests
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Tests >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed Error macros 'log_errors and exceptions' ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
echo " Clang - Error macros 'log_errors' test" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
cd ../../../etl_error_handler/log_errors
|
||||
mkdir -p build-make || exit 1
|
||||
cd build-make || exit 1
|
||||
rm * -rf
|
||||
clang --version | grep clang | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Error macros 'log_errors' Compilation >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed Error macros 'log_errors' ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
./etl_tests
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Tests >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed Error macros 'log_errors' ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
echo " Clang - Error macros 'exceptions' test" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
cd ../../../etl_error_handler/exceptions
|
||||
mkdir -p build-make || exit 1
|
||||
cd build-make || exit 1
|
||||
rm * -rf
|
||||
clang --version | grep clang | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Error macros 'exceptions' Compilation >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed Error macros 'exceptions' ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
./etl_tests
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Tests >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed Error macros 'exceptions' ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
echo " Clang - Error macros 'log_errors and exceptions' test" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
cd ../../../etl_error_handler/log_errors_and_exceptions
|
||||
mkdir -p build-make || exit 1
|
||||
cd build-make || exit 1
|
||||
rm * -rf
|
||||
clang --version | grep clang | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Error macros 'log_errors and exceptions' Compilation >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed Error macros 'log_errors and exceptions' ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
./etl_tests
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "<<<< Passed Tests >>>>"
|
||||
else
|
||||
echo "****************\n**** Failed Error macros 'log_errors and exceptions' ****\n****************" | tee -a ../log.txt
|
||||
exit $?
|
||||
fi
|
||||
|
||||
cd ../..
|
||||
|
||||
echo ""
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
echo " All Tests Completed OK" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
@ -6,7 +6,16 @@ cd build-make || exit 1
|
||||
|
||||
echo "ETL Tests" > log.txt
|
||||
|
||||
opt="-O0"
|
||||
# Set the optimisation level
|
||||
if [ "$1" = "1" ]; then
|
||||
opt="-O1"
|
||||
elif [ "$1" = "2" ]; then
|
||||
opt="-O2"
|
||||
elif [ "$1" = "3" ]; then
|
||||
opt="-O3"
|
||||
else
|
||||
opt="-O0"
|
||||
fi
|
||||
|
||||
#******************************************************************************
|
||||
# GCC
|
||||
@ -17,6 +26,7 @@ echo " GCC - STL" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
rm * -rf
|
||||
gcc --version | grep gcc | tee -a log.txt
|
||||
echo "Using optimisation" $opt | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="g++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=$opt ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
@ -38,6 +48,7 @@ echo " GCC - STL - Force C++03" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
rm * -rf
|
||||
gcc --version | grep gcc | tee -a log.txt
|
||||
echo "Using optimisation" $opt | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="g++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_OPTIMISATION=$opt ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
@ -59,6 +70,7 @@ echo " GCC - No STL" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
rm * -rf
|
||||
gcc --version | grep gcc | tee -a log.txt
|
||||
echo "Using optimisation" $opt | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="g++" -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=$opt ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
@ -84,6 +96,7 @@ echo " Clang - STL" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
rm * -rf
|
||||
clang --version | grep clang | tee -a log.txt
|
||||
echo "Using optimisation" $opt | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="clang++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=$opt ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
@ -105,6 +118,7 @@ echo " Clang - STL - Force C++03" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
rm * -rf
|
||||
clang --version | grep clang | tee -a log.txt
|
||||
echo "Using optimisation" $opt | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="clang++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_OPTIMISATION=$opt ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
@ -126,6 +140,7 @@ echo " Clang - No STL" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
rm * -rf
|
||||
clang --version | grep clang | tee -a log.txt
|
||||
echo "Using optimisation" $opt | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="clang++" -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=$opt ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
@ -151,6 +166,7 @@ mkdir -p build-make || exit 1
|
||||
cd build-make || exit 1
|
||||
rm * -rf
|
||||
gcc --version | grep gcc | tee -a log.txt
|
||||
echo "Using optimisation" $opt | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
@ -173,6 +189,7 @@ echo " Clang - Initializer list test" | tee -a log.txt
|
||||
echo "-----------------------------------------------" | tee -a log.txt
|
||||
rm * -rf
|
||||
clang --version | grep clang | tee -a log.txt
|
||||
echo "Using optimisation" $opt | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
@ -198,6 +215,7 @@ mkdir -p build-make || exit 1
|
||||
cd build-make || exit 1
|
||||
rm * -rf
|
||||
gcc --version | grep gcc | tee -a log.txt
|
||||
echo "Using optimisation" $opt | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
@ -223,6 +241,7 @@ mkdir -p build-make || exit 1
|
||||
cd build-make || exit 1
|
||||
rm * -rf
|
||||
gcc --version | grep gcc | tee -a log.txt
|
||||
echo "Using optimisation" $opt | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
@ -248,6 +267,7 @@ mkdir -p build-make || exit 1
|
||||
cd build-make || exit 1
|
||||
rm * -rf
|
||||
gcc --version | grep gcc | tee -a log.txt
|
||||
echo "Using optimisation" $opt | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
@ -273,6 +293,7 @@ mkdir -p build-make || exit 1
|
||||
cd build-make || exit 1
|
||||
rm * -rf
|
||||
clang --version | grep clang | tee -a log.txt
|
||||
echo "Using optimisation" $opt | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
@ -298,6 +319,7 @@ mkdir -p build-make || exit 1
|
||||
cd build-make || exit 1
|
||||
rm * -rf
|
||||
clang --version | grep clang | tee -a log.txt
|
||||
echo "Using optimisation" $opt | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
@ -323,6 +345,7 @@ mkdir -p build-make || exit 1
|
||||
cd build-make || exit 1
|
||||
rm * -rf
|
||||
clang --version | grep clang | tee -a log.txt
|
||||
echo "Using optimisation" $opt | tee -a log.txt
|
||||
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt ..
|
||||
make -j4
|
||||
if [ $? -eq 0 ]; then
|
||||
|
||||
@ -1601,7 +1601,7 @@ namespace
|
||||
etl::transform_s(std::begin(input),
|
||||
std::end(input),
|
||||
std::begin(output),
|
||||
std::begin(output) + (std::size(output) / 2),
|
||||
std::begin(output) + (ETL_OR_STD::size(output) / 2),
|
||||
std::bind(std::multiplies<int>(), std::placeholders::_1, 2));
|
||||
|
||||
bool is_same = std::equal(std::begin(output), std::end(output), std::begin(compare));
|
||||
@ -1610,7 +1610,7 @@ namespace
|
||||
std::fill(std::begin(output), std::end(output), 0);
|
||||
|
||||
etl::transform_s(std::begin(input),
|
||||
std::begin(input) + (std::size(input) / 2),
|
||||
std::begin(input) + (ETL_OR_STD::size(input) / 2),
|
||||
std::begin(output),
|
||||
std::end(output),
|
||||
std::bind(std::multiplies<int>(), std::placeholders::_1, 2));
|
||||
|
||||
@ -701,7 +701,7 @@ namespace
|
||||
auto data = etl::make_array<char>(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
|
||||
using Type = std::remove_reference_t<decltype(data[0])>;
|
||||
CHECK((std::is_same_v<char, Type>));
|
||||
CHECK((std::is_same<char, Type>::value));
|
||||
|
||||
CHECK_EQUAL(0, data[0]);
|
||||
CHECK_EQUAL(1, data[1]);
|
||||
@ -723,7 +723,7 @@ namespace
|
||||
auto data = etl::make_array<Moveable>(Moveable(0), Moveable(1), Moveable(2), Moveable(3), Moveable(4), Moveable(5), Moveable(6), Moveable(7), Moveable(8), Moveable(9));
|
||||
|
||||
using Type = std::remove_reference_t<decltype(data[0])>;
|
||||
CHECK((std::is_same_v<Moveable, Type>));
|
||||
CHECK((std::is_same<Moveable, Type>::value));
|
||||
|
||||
CHECK_EQUAL(Moveable(0), data[0]);
|
||||
CHECK_EQUAL(Moveable(1), data[1]);
|
||||
|
||||
@ -147,7 +147,7 @@ namespace
|
||||
CHECK_EQUAL(false, result.value());
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<bool>(), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<bool>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -202,7 +202,7 @@ namespace
|
||||
CHECK_EQUAL(false, result.value());
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(etl::read<bool>(bit_stream), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(etl::read<bool>(bit_stream));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -238,7 +238,7 @@ namespace
|
||||
CHECK_EQUAL(int(expected[3]), int(result.value()));
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<int8_t>(), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<int8_t>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -274,7 +274,7 @@ namespace
|
||||
CHECK_EQUAL(int(expected[3]), int(result.value()));
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(etl::read<int8_t>(bit_stream), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(etl::read<int8_t>(bit_stream));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -305,7 +305,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_read_int8_t_5bits)
|
||||
{
|
||||
std::array<char, 4U> storage = { char(0x0E), char(0x8B), char(0xF0) };
|
||||
std::array<char, 3U> storage = { char(0x0E), char(0x8B), char(0xF0) };
|
||||
std::array<char, 4U> expected = { int8_t(0x01), int8_t(0xFA), int8_t(0x05), int8_t(0xFF) };
|
||||
|
||||
etl::bit_stream_reader bit_stream(storage.data(), storage.size(), etl::endian::big);
|
||||
@ -335,13 +335,13 @@ namespace
|
||||
CHECK_EQUAL(int(expected[3]), int(result.value()));
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<int8_t>(5U), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<int8_t>(5U));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_read_int8_t_5bits_with_skip)
|
||||
{
|
||||
std::array<char, 4U> storage = { char(0x0E), char(0x8B), char(0xF0) };
|
||||
std::array<char, 3U> storage = { char(0x0E), char(0x8B), char(0xF0) };
|
||||
std::array<int8_t, 4U> expected = { int8_t(0x01), int8_t(0xFA), int8_t(0x05), int8_t(0xFF) };
|
||||
|
||||
etl::bit_stream_reader bit_stream(storage.data(), storage.size(), etl::endian::big);
|
||||
@ -369,13 +369,13 @@ namespace
|
||||
CHECK_EQUAL(int(expected[3]), int(result.value()));
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<int8_t>(5U), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<int8_t>(5U));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_read_checked_int8_t_5bits_using_non_member_function)
|
||||
{
|
||||
std::array<char, 4U> storage = { char(0x0E), char(0x8B), char(0xF0) };
|
||||
std::array<char, 3U> storage = { char(0x0E), char(0x8B), char(0xF0) };
|
||||
std::array<int8_t, 4U> expected = { int8_t(0x01), int8_t(0xFA), int8_t(0x05), int8_t(0xFF) };
|
||||
|
||||
etl::bit_stream_reader bit_stream(storage.data(), storage.size(), etl::endian::big);
|
||||
@ -405,13 +405,13 @@ namespace
|
||||
CHECK_EQUAL(int(expected[3]), int(result.value()));
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(etl::read<int8_t>(bit_stream, 5U), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(etl::read<int8_t>(bit_stream, 5U));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_read_unchecked_int8_t_5bits_using_non_member_function)
|
||||
{
|
||||
std::array<char, 4U> storage = { char(0x0E), char(0x8B), char(0xF0) };
|
||||
std::array<char, 3U> storage = { char(0x0E), char(0x8B), char(0xF0) };
|
||||
std::array<int8_t, 4U> expected = { int8_t(0x01), int8_t(0xFA), int8_t(0x05), int8_t(0xFF) };
|
||||
|
||||
etl::bit_stream_reader bit_stream(storage.data(), storage.size(), etl::endian::big);
|
||||
@ -466,13 +466,13 @@ namespace
|
||||
CHECK_EQUAL(int(expected[3]), int(result.value()));
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<uint8_t>(), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<uint8_t>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_read_uint8_t_5bits)
|
||||
{
|
||||
std::array<char, 4U> storage = { char(0x0E), char(0x8B), char(0xF0) };
|
||||
std::array<char, 3U> storage = { char(0x0E), char(0x8B), char(0xF0) };
|
||||
std::array<char, 4U> expected = { uint8_t(0x01), uint8_t(0x1A), uint8_t(0x05), uint8_t(0x1F) };
|
||||
|
||||
etl::bit_stream_reader bit_stream(storage.data(), storage.size(), etl::endian::big);
|
||||
@ -502,7 +502,7 @@ namespace
|
||||
CHECK_EQUAL(int(expected[3]), int(result.value()));
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<uint8_t>(5U), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<uint8_t>(5U));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -538,7 +538,7 @@ namespace
|
||||
CHECK_EQUAL(expected[3], result.value());
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<int16_t>(), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<int16_t>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -574,7 +574,7 @@ namespace
|
||||
CHECK_EQUAL(expected[3], result.value());
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<int16_t>(10U), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<int16_t>(10U));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -610,7 +610,7 @@ namespace
|
||||
CHECK_EQUAL(expected[3], result.value());
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<uint16_t>(), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<uint16_t>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -646,7 +646,7 @@ namespace
|
||||
CHECK_EQUAL(expected[3], result.value());
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<uint16_t>(10U), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<uint16_t>(10U));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -685,15 +685,15 @@ namespace
|
||||
CHECK_EQUAL(expected[3], result.value());
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<int32_t>(), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<int32_t>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_read_int32_t_22bits)
|
||||
{
|
||||
std::array<char, 16U> storage = { char(0x00), char(0x00), char(0x05), char(0xAA),
|
||||
char(0x55), char(0xA9), char(0x56), char(0xA9),
|
||||
char(0x7F), char(0xFF), char(0xFF) };
|
||||
std::array<char, 11U> storage = { char(0x00), char(0x00), char(0x05), char(0xAA),
|
||||
char(0x55), char(0xA9), char(0x56), char(0xA9),
|
||||
char(0x7F), char(0xFF), char(0xFF) };
|
||||
std::array<int32_t, 4U> expected = { int32_t(0x00000001), int32_t(0x001AA55A), int32_t(0xFFE55AA5), int32_t(0xFFFFFFFF) };
|
||||
|
||||
etl::bit_stream_reader bit_stream(storage.data(), storage.size(), etl::endian::big);
|
||||
@ -723,7 +723,7 @@ namespace
|
||||
CHECK_EQUAL(expected[3], result.value());
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<int32_t>(22U), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<int32_t>(22U));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -762,15 +762,15 @@ namespace
|
||||
CHECK_EQUAL(expected[3], result.value());
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<uint32_t>(), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<uint32_t>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_read_uint32_t_22bits)
|
||||
{
|
||||
std::array<char, 16U> storage = { char(0x00), char(0x00), char(0x05), char(0xAA),
|
||||
char(0x55), char(0xA9), char(0x56), char(0xA9),
|
||||
char(0x7F), char(0xFF), char(0xFF) };
|
||||
std::array<char, 11U> storage = { char(0x00), char(0x00), char(0x05), char(0xAA),
|
||||
char(0x55), char(0xA9), char(0x56), char(0xA9),
|
||||
char(0x7F), char(0xFF), char(0xFF) };
|
||||
std::array<uint32_t, 4U> expected = { uint32_t(0x00000001), uint32_t(0x001AA55A), uint32_t(0x00255AA5), uint32_t(0x003FFFFF) };
|
||||
|
||||
etl::bit_stream_reader bit_stream(storage.data(), storage.size(), etl::endian::big);
|
||||
@ -800,7 +800,7 @@ namespace
|
||||
CHECK_EQUAL(expected[3], result.value());
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<uint32_t>(22U), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<uint32_t>(22U));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -839,7 +839,7 @@ namespace
|
||||
CHECK_EQUAL(expected[3], result.value());
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<int64_t>(), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<int64_t>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -877,7 +877,7 @@ namespace
|
||||
CHECK_EQUAL(expected[3], result.value());
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<int64_t>(47U), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<int64_t>(47U));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -916,7 +916,7 @@ namespace
|
||||
CHECK_EQUAL(expected[3], result.value());
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<uint64_t>(), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<uint64_t>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -954,7 +954,7 @@ namespace
|
||||
CHECK_EQUAL(expected[3], result.value());
|
||||
|
||||
// One too many.
|
||||
CHECK_THROW(bit_stream.read<uint64_t>(47U), etl::bit_stream_overflow);
|
||||
CHECK_FALSE(bit_stream.read<uint64_t>(47U));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -109,7 +109,7 @@ namespace
|
||||
{
|
||||
char storage[7];
|
||||
|
||||
etl::byte_stream_writer writer(storage, std::size(storage), etl::endian::big);
|
||||
etl::byte_stream_writer writer(storage, ETL_OR_STD::size(storage), etl::endian::big);
|
||||
etl::byte_stream_reader reader(storage, writer.size_bytes(), etl::endian::big); // Capacity is zero.
|
||||
|
||||
CHECK(writer.empty());
|
||||
@ -120,7 +120,7 @@ namespace
|
||||
CHECK_EQUAL(0U, writer.size_bytes());
|
||||
CHECK_EQUAL(0U, reader.size_bytes());
|
||||
|
||||
CHECK_EQUAL(std::size(storage), writer.capacity());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(storage), writer.capacity());
|
||||
|
||||
CHECK_EQUAL(0U, reader.available<int8_t>());
|
||||
|
||||
@ -136,9 +136,9 @@ namespace
|
||||
{
|
||||
char storage[8];
|
||||
|
||||
etl::byte_stream_writer writer(storage, std::size(storage), etl::endian::big);
|
||||
etl::byte_stream_writer writer(storage, ETL_OR_STD::size(storage), etl::endian::big);
|
||||
|
||||
etl::span<char> storage_span(storage, storage + std::size(storage));
|
||||
etl::span<char> storage_span(storage, storage + ETL_OR_STD::size(storage));
|
||||
etl::span<char> writer_span = writer.data();
|
||||
CHECK(writer_span.begin() == storage_span.begin());
|
||||
CHECK(writer_span.end() == storage_span.end());
|
||||
@ -150,7 +150,7 @@ namespace
|
||||
etl::span<char> free_span = writer.free_data();
|
||||
|
||||
CHECK_EQUAL(sizeof(uint8_t) + sizeof(uint16_t), (std::distance(used_span.begin(), used_span.end())));
|
||||
CHECK_EQUAL(std::size(storage) - sizeof(uint8_t) - sizeof(uint16_t), (std::distance(free_span.begin(), free_span.end())));
|
||||
CHECK_EQUAL(ETL_OR_STD::size(storage) - sizeof(uint8_t) - sizeof(uint16_t), (std::distance(free_span.begin(), free_span.end())));
|
||||
|
||||
CHECK(writer.write(uint32_t(0x12345678U))); // 4 more written.
|
||||
CHECK_FALSE(writer.write(uint32_t(0x12345678U))); // Can't write 4 more.
|
||||
|
||||
@ -50,10 +50,10 @@ namespace
|
||||
--guard_count;
|
||||
}
|
||||
|
||||
volatile static int guard_count;
|
||||
static int guard_count;
|
||||
};
|
||||
|
||||
volatile int ScopedGuard::guard_count = 0;
|
||||
int ScopedGuard::guard_count = 0;
|
||||
|
||||
//***************************************************************************
|
||||
struct TimerLogEntry
|
||||
@ -791,7 +791,7 @@ namespace
|
||||
}
|
||||
|
||||
// Check the results log.
|
||||
for (auto t : timer_log)
|
||||
for (auto& t : timer_log)
|
||||
{
|
||||
switch (t.id)
|
||||
{
|
||||
|
||||
@ -74,7 +74,7 @@ namespace
|
||||
char_type r = 'A';
|
||||
char_type c = 'B';
|
||||
char_type src[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
char_type dst[std::size(src)];
|
||||
char_type dst[ETL_OR_STD::size(src)];
|
||||
char_type filled[] = { 9, 9, 9, 9, 9, 9, 9, 9, 9, 9 };
|
||||
const char_type* p_src;
|
||||
char_type* p_dst;
|
||||
@ -96,18 +96,18 @@ namespace
|
||||
CHECK_EQUAL(-1, char_traits::compare("ABCDEE", "ABCDEF", 6U));
|
||||
CHECK_EQUAL(1, char_traits::compare("ABCDEF", "ABCDEE", 6U));
|
||||
|
||||
p_dst = char_traits::assign(dst, std::size(dst), 9);
|
||||
CHECK_ARRAY_EQUAL(filled, p_dst, std::size(filled));
|
||||
p_dst = char_traits::assign(dst, ETL_OR_STD::size(dst), 9);
|
||||
CHECK_ARRAY_EQUAL(filled, p_dst, ETL_OR_STD::size(filled));
|
||||
|
||||
std::fill_n(dst, std::size(dst), 0);
|
||||
p_dst = char_traits::copy(dst, src, std::size(src));
|
||||
CHECK_ARRAY_EQUAL(src, p_dst, std::size(src));
|
||||
std::fill_n(dst, ETL_OR_STD::size(dst), 0);
|
||||
p_dst = char_traits::copy(dst, src, ETL_OR_STD::size(src));
|
||||
CHECK_ARRAY_EQUAL(src, p_dst, ETL_OR_STD::size(src));
|
||||
|
||||
std::fill_n(dst, std::size(dst), 0);
|
||||
p_dst = char_traits::move(dst, src, std::size(src));
|
||||
CHECK_ARRAY_EQUAL(src, p_dst, std::size(src));
|
||||
std::fill_n(dst, ETL_OR_STD::size(dst), 0);
|
||||
p_dst = char_traits::move(dst, src, ETL_OR_STD::size(src));
|
||||
CHECK_ARRAY_EQUAL(src, p_dst, ETL_OR_STD::size(src));
|
||||
|
||||
p_src = char_traits::find(src, std::size(src), 4);
|
||||
p_src = char_traits::find(src, ETL_OR_STD::size(src), 4);
|
||||
CHECK_EQUAL(src[4], *p_src);
|
||||
|
||||
CHECK_EQUAL(127, char_traits::to_char_type(int_type(127)));
|
||||
@ -130,7 +130,7 @@ namespace
|
||||
char_type r = L'A';
|
||||
char_type c = L'B';
|
||||
char_type src[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
char_type dst[std::size(src)];
|
||||
char_type dst[ETL_OR_STD::size(src)];
|
||||
char_type filled[] = { 9, 9, 9, 9, 9, 9, 9, 9, 9, 9 };
|
||||
const char_type* p_src;
|
||||
char_type* p_dst;
|
||||
@ -152,22 +152,22 @@ namespace
|
||||
CHECK_EQUAL(-1, char_traits::compare(L"ABCDEE", L"ABCDEF", 6U));
|
||||
CHECK_EQUAL(1, char_traits::compare(L"ABCDEF", L"ABCDEE", 6U));
|
||||
|
||||
p_dst = char_traits::assign(dst, std::size(dst), 9);
|
||||
CHECK_ARRAY_EQUAL(filled, p_dst, std::size(filled));
|
||||
p_dst = char_traits::assign(dst, ETL_OR_STD::size(dst), 9);
|
||||
CHECK_ARRAY_EQUAL(filled, p_dst, ETL_OR_STD::size(filled));
|
||||
|
||||
std::fill_n(dst, std::size(dst), 0);
|
||||
p_dst = char_traits::copy(dst, src, std::size(src));
|
||||
CHECK_ARRAY_EQUAL(src, p_dst, std::size(src));
|
||||
std::fill_n(dst, ETL_OR_STD::size(dst), 0);
|
||||
p_dst = char_traits::copy(dst, src, ETL_OR_STD::size(src));
|
||||
CHECK_ARRAY_EQUAL(src, p_dst, ETL_OR_STD::size(src));
|
||||
|
||||
std::fill_n(dst, std::size(dst), 0);
|
||||
p_dst = char_traits::move(dst, src, std::size(src));
|
||||
CHECK_ARRAY_EQUAL(src, p_dst, std::size(src));
|
||||
std::fill_n(dst, ETL_OR_STD::size(dst), 0);
|
||||
p_dst = char_traits::move(dst, src, ETL_OR_STD::size(src));
|
||||
CHECK_ARRAY_EQUAL(src, p_dst, ETL_OR_STD::size(src));
|
||||
|
||||
p_src = char_traits::find(src, std::size(src), 4);
|
||||
p_src = char_traits::find(src, ETL_OR_STD::size(src), 4);
|
||||
CHECK_EQUAL(src[4], *p_src);
|
||||
|
||||
CHECK_EQUAL(127, char_traits::to_char_type(int_type(127)));
|
||||
CHECK_EQUAL(127, char_traits::to_int_type(char_type(127)));
|
||||
CHECK_TRUE(127 == char_traits::to_char_type(int_type(127)));
|
||||
CHECK_TRUE(127 == char_traits::to_int_type(char_type(127)));
|
||||
|
||||
CHECK(!char_traits::eq_int_type(0, 1));
|
||||
CHECK(char_traits::eq_int_type(1, 1));
|
||||
@ -186,7 +186,7 @@ namespace
|
||||
char_type r = u'A';
|
||||
char_type c = u'B';
|
||||
char_type src[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
char_type dst[std::size(src)];
|
||||
char_type dst[ETL_OR_STD::size(src)];
|
||||
char_type filled[] = { 9, 9, 9, 9, 9, 9, 9, 9, 9, 9 };
|
||||
const char_type* p_src;
|
||||
char_type* p_dst;
|
||||
@ -208,22 +208,21 @@ namespace
|
||||
CHECK_EQUAL(-1, char_traits::compare(u"ABCDEE", u"ABCDEF", 6U));
|
||||
CHECK_EQUAL(1, char_traits::compare(u"ABCDEF", u"ABCDEE", 6U));
|
||||
|
||||
p_dst = char_traits::assign(dst, std::size(dst), 9);
|
||||
CHECK_ARRAY_EQUAL(filled, p_dst, std::size(filled));
|
||||
p_dst = char_traits::assign(dst, ETL_OR_STD::size(dst), 9);
|
||||
CHECK_ARRAY_EQUAL(filled, p_dst, ETL_OR_STD::size(filled));
|
||||
|
||||
std::fill_n(dst, std::size(dst), 0);
|
||||
p_dst = char_traits::copy(dst, src, std::size(src));
|
||||
CHECK_ARRAY_EQUAL(src, p_dst, std::size(src));
|
||||
std::fill_n(dst, ETL_OR_STD::size(dst), 0);
|
||||
p_dst = char_traits::copy(dst, src, ETL_OR_STD::size(src));
|
||||
CHECK_ARRAY_EQUAL(src, p_dst, ETL_OR_STD::size(src));
|
||||
|
||||
std::fill_n(dst, std::size(dst), 0);
|
||||
p_dst = char_traits::move(dst, src, std::size(src));
|
||||
CHECK_ARRAY_EQUAL(src, p_dst, std::size(src));
|
||||
std::fill_n(dst, ETL_OR_STD::size(dst), 0);
|
||||
p_dst = char_traits::move(dst, src, ETL_OR_STD::size(src));
|
||||
CHECK_ARRAY_EQUAL(src, p_dst, ETL_OR_STD::size(src));
|
||||
|
||||
p_src = char_traits::find(src, std::size(src), 4);
|
||||
p_src = char_traits::find(src, ETL_OR_STD::size(src), 4);
|
||||
CHECK_EQUAL(src[4], *p_src);
|
||||
|
||||
CHECK_EQUAL(127, char_traits::to_char_type(int_type(127)));
|
||||
CHECK_EQUAL(127, char_traits::to_int_type(char_type(127)));
|
||||
CHECK_EQUAL(127, char_type(127));
|
||||
|
||||
CHECK(!char_traits::eq_int_type(0, 1));
|
||||
CHECK(char_traits::eq_int_type(1, 1));
|
||||
@ -242,7 +241,7 @@ namespace
|
||||
char_type r = U'A';
|
||||
char_type c = U'B';
|
||||
char_type src[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
char_type dst[std::size(src)];
|
||||
char_type dst[ETL_OR_STD::size(src)];
|
||||
char_type filled[] = { 9, 9, 9, 9, 9, 9, 9, 9, 9, 9 };
|
||||
const char_type* p_src;
|
||||
char_type* p_dst;
|
||||
@ -264,21 +263,20 @@ namespace
|
||||
CHECK_EQUAL(-1, char_traits::compare(U"ABCDEE", U"ABCDEF", 6U));
|
||||
CHECK_EQUAL(1, char_traits::compare(U"ABCDEF", U"ABCDEE", 6U));
|
||||
|
||||
p_dst = char_traits::assign(dst, std::size(dst), 9);
|
||||
CHECK_ARRAY_EQUAL(filled, p_dst, std::size(filled));
|
||||
p_dst = char_traits::assign(dst, ETL_OR_STD::size(dst), 9);
|
||||
CHECK_ARRAY_EQUAL(filled, p_dst, ETL_OR_STD::size(filled));
|
||||
|
||||
std::fill_n(dst, std::size(dst), 0);
|
||||
p_dst = char_traits::copy(dst, src, std::size(src));
|
||||
CHECK_ARRAY_EQUAL(src, p_dst, std::size(src));
|
||||
std::fill_n(dst, ETL_OR_STD::size(dst), 0);
|
||||
p_dst = char_traits::copy(dst, src, ETL_OR_STD::size(src));
|
||||
CHECK_ARRAY_EQUAL(src, p_dst, ETL_OR_STD::size(src));
|
||||
|
||||
std::fill_n(dst, std::size(dst), 0);
|
||||
p_dst = char_traits::move(dst, src, std::size(src));
|
||||
CHECK_ARRAY_EQUAL(src, p_dst, std::size(src));
|
||||
std::fill_n(dst, ETL_OR_STD::size(dst), 0);
|
||||
p_dst = char_traits::move(dst, src, ETL_OR_STD::size(src));
|
||||
CHECK_ARRAY_EQUAL(src, p_dst, ETL_OR_STD::size(src));
|
||||
|
||||
p_src = char_traits::find(src, std::size(src), 4);
|
||||
p_src = char_traits::find(src, ETL_OR_STD::size(src), 4);
|
||||
CHECK_EQUAL(src[4], *p_src);
|
||||
|
||||
CHECK_EQUAL(127, char_traits::to_char_type(int_type(127)));
|
||||
CHECK_EQUAL(127, char_traits::to_int_type(char_type(127)));
|
||||
|
||||
CHECK(!char_traits::eq_int_type(0, 1));
|
||||
|
||||
@ -63,8 +63,8 @@ namespace
|
||||
CHECK(std::begin(data) == ci.begin());
|
||||
CHECK(std::end(data) == ci.end());
|
||||
CHECK(std::begin(data) == ci.current());
|
||||
CHECK_EQUAL(std::size(data), size_t(std::distance(ci.begin(), ci.end())));
|
||||
CHECK_EQUAL(std::size(data), ci.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), size_t(std::distance(ci.begin(), ci.end())));
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), ci.size());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -80,8 +80,8 @@ namespace
|
||||
CHECK(std::begin(data) == ci.begin());
|
||||
CHECK(std::end(data) == ci.end());
|
||||
CHECK(start == ci.current());
|
||||
CHECK_EQUAL(std::size(data), size_t(std::distance(ci.begin(), ci.end())));
|
||||
CHECK_EQUAL(std::size(data), ci.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), size_t(std::distance(ci.begin(), ci.end())));
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), ci.size());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -645,7 +645,7 @@ namespace
|
||||
|
||||
for (int i = 0; i < 20; i += step)
|
||||
{
|
||||
CHECK_EQUAL(expected[i % std::size(data)], *ci);
|
||||
CHECK_EQUAL(expected[i % ETL_OR_STD::size(data)], *ci);
|
||||
ci -= step;
|
||||
}
|
||||
}
|
||||
@ -663,7 +663,7 @@ namespace
|
||||
|
||||
for (int i = 0; i < 20; i += step)
|
||||
{
|
||||
CHECK_EQUAL(expected[i % std::size(data)], *ci);
|
||||
CHECK_EQUAL(expected[i % ETL_OR_STD::size(data)], *ci);
|
||||
ci = ci - step;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,48 +0,0 @@
|
||||
/******************************************************************************
|
||||
The MIT License(MIT)
|
||||
|
||||
Embedded Template Library.
|
||||
https://github.com/ETLCPP/etl
|
||||
https://www.etlcpp.com
|
||||
|
||||
Copyright(c) 2019 John Wellbelove
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files(the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions :
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
#include "unit_test_framework.h"
|
||||
|
||||
#include "etl/platform.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
const bool cpp11_supported = ETL_USING_CPP11;
|
||||
const bool cpp14_supported = ETL_USING_CPP14;
|
||||
const bool cpp17_supported = ETL_USING_CPP17;
|
||||
|
||||
SUITE(test_compiler_settings)
|
||||
{
|
||||
TEST(test_cpp)
|
||||
{
|
||||
CHECK(cpp11_supported);
|
||||
CHECK(cpp14_supported);
|
||||
CHECK(cpp17_supported);
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -129,7 +129,7 @@ namespace
|
||||
const size_t SIZE = 10UL;
|
||||
std::list<int> data(SIZE);
|
||||
|
||||
size_t runtime_size = etl::size(data);
|
||||
size_t runtime_size = ETL_OR_STD::size(data);
|
||||
CHECK_EQUAL(SIZE, runtime_size);
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ namespace
|
||||
const size_t SIZE = 10UL;
|
||||
int data[SIZE];
|
||||
|
||||
size_t runtime_size = etl::size(data);
|
||||
size_t runtime_size = ETL_OR_STD::size(data);
|
||||
CHECK_EQUAL(SIZE, runtime_size);
|
||||
|
||||
size_t compiletime_size = sizeof(etl::array_size(data));
|
||||
|
||||
@ -32,7 +32,6 @@ SOFTWARE.
|
||||
#include "etl/type_traits.h"
|
||||
|
||||
#include <string>
|
||||
#include <variant>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
@ -1525,7 +1525,7 @@ namespace
|
||||
|
||||
auto v = *data.begin();
|
||||
using Type = decltype(v);
|
||||
CHECK((std::is_same_v<Pair, Type>));
|
||||
CHECK((std::is_same<Pair, Type>::value));
|
||||
|
||||
CHECK_EQUAL(NDC("A"), data.at(0));
|
||||
CHECK_EQUAL(NDC("B"), data.at(1));
|
||||
|
||||
@ -1326,7 +1326,7 @@ namespace
|
||||
|
||||
auto v = *data.begin();
|
||||
using Type = decltype(v);
|
||||
CHECK((std::is_same_v<Pair, Type>));
|
||||
CHECK((std::is_same<Pair, Type>::value));
|
||||
|
||||
decltype(data)::const_iterator itr = data.begin();
|
||||
|
||||
|
||||
@ -1273,7 +1273,7 @@ namespace
|
||||
|
||||
auto v = *data.begin();
|
||||
using Type = decltype(v);
|
||||
CHECK((std::is_same_v<NDC, Type>));
|
||||
CHECK((std::is_same<NDC, Type>::value));
|
||||
|
||||
decltype(data)::const_iterator itr = data.begin();
|
||||
|
||||
|
||||
@ -1196,7 +1196,7 @@ namespace
|
||||
|
||||
auto v = *data.begin();
|
||||
using Type = decltype(v);
|
||||
CHECK((std::is_same_v<NDC, Type>));
|
||||
CHECK((std::is_same<NDC, Type>::value));
|
||||
|
||||
decltype(data)::const_iterator itr = data.begin();
|
||||
|
||||
|
||||
@ -1403,7 +1403,7 @@ namespace
|
||||
|
||||
auto v = *data.begin();
|
||||
using Type = decltype(v);
|
||||
CHECK((std::is_same_v<ItemNDC, Type>));
|
||||
CHECK((std::is_same<ItemNDC, Type>::value));
|
||||
|
||||
decltype(data)::const_iterator itr = data.begin();
|
||||
|
||||
|
||||
@ -341,7 +341,7 @@ namespace
|
||||
CHECK(motorControl.is_producer());
|
||||
CHECK(motorControl.is_consumer());
|
||||
|
||||
motorControl.Initialise(stateList, std::size(stateList));
|
||||
motorControl.Initialise(stateList, ETL_OR_STD::size(stateList));
|
||||
motorControl.reset();
|
||||
motorControl.ClearStatistics();
|
||||
|
||||
@ -480,7 +480,7 @@ namespace
|
||||
{
|
||||
etl::null_message_router nmr;
|
||||
|
||||
motorControl.Initialise(stateList, std::size(stateList));
|
||||
motorControl.Initialise(stateList, ETL_OR_STD::size(stateList));
|
||||
motorControl.reset();
|
||||
motorControl.ClearStatistics();
|
||||
|
||||
@ -529,7 +529,7 @@ namespace
|
||||
{
|
||||
etl::null_message_router nmr;
|
||||
|
||||
motorControl.Initialise(stateList, std::size(stateList));
|
||||
motorControl.Initialise(stateList, ETL_OR_STD::size(stateList));
|
||||
motorControl.reset();
|
||||
motorControl.ClearStatistics();
|
||||
|
||||
|
||||
@ -474,9 +474,9 @@ namespace
|
||||
CHECK(motorControl.is_producer());
|
||||
CHECK(motorControl.is_consumer());
|
||||
|
||||
running.set_child_states(childStates, std::size(childStates));
|
||||
running.set_child_states(childStates, ETL_OR_STD::size(childStates));
|
||||
|
||||
motorControl.Initialise(stateList, std::size(stateList));
|
||||
motorControl.Initialise(stateList, ETL_OR_STD::size(stateList));
|
||||
motorControl.reset();
|
||||
motorControl.ClearStatistics();
|
||||
|
||||
@ -647,7 +647,7 @@ namespace
|
||||
{
|
||||
etl::null_message_router nmr;
|
||||
|
||||
motorControl.Initialise(stateList, std::size(stateList));
|
||||
motorControl.Initialise(stateList, ETL_OR_STD::size(stateList));
|
||||
motorControl.reset();
|
||||
motorControl.ClearStatistics();
|
||||
|
||||
@ -700,7 +700,7 @@ namespace
|
||||
{
|
||||
etl::null_message_router nmr;
|
||||
|
||||
motorControl.Initialise(stateList, std::size(stateList));
|
||||
motorControl.Initialise(stateList, ETL_OR_STD::size(stateList));
|
||||
motorControl.reset();
|
||||
motorControl.ClearStatistics();
|
||||
|
||||
@ -754,7 +754,7 @@ namespace
|
||||
{
|
||||
etl::null_message_router nmr;
|
||||
|
||||
motorControl.Initialise(stateList, std::size(stateList));
|
||||
motorControl.Initialise(stateList, ETL_OR_STD::size(stateList));
|
||||
motorControl.reset();
|
||||
motorControl.ClearStatistics();
|
||||
|
||||
@ -809,7 +809,7 @@ namespace
|
||||
{
|
||||
etl::null_message_router nmr;
|
||||
|
||||
motorControl.Initialise(stateList, std::size(stateList));
|
||||
motorControl.Initialise(stateList, ETL_OR_STD::size(stateList));
|
||||
motorControl.reset();
|
||||
motorControl.ClearStatistics();
|
||||
|
||||
@ -902,7 +902,7 @@ namespace
|
||||
{
|
||||
MotorControl mc;
|
||||
|
||||
motorControl.Initialise(stateList, std::size(stateList));
|
||||
motorControl.Initialise(stateList, ETL_OR_STD::size(stateList));
|
||||
motorControl.reset();
|
||||
motorControl.ClearStatistics();
|
||||
|
||||
@ -941,7 +941,7 @@ namespace
|
||||
{
|
||||
MotorControl mc;
|
||||
|
||||
motorControl.Initialise(stateList, std::size(stateList));
|
||||
motorControl.Initialise(stateList, ETL_OR_STD::size(stateList));
|
||||
motorControl.reset();
|
||||
motorControl.ClearStatistics();
|
||||
|
||||
|
||||
@ -2166,7 +2166,7 @@ namespace
|
||||
|
||||
auto v = *data.begin();
|
||||
using Type = decltype(v);
|
||||
CHECK((std::is_same_v<ItemNDC, Type>));
|
||||
CHECK((std::is_same<ItemNDC, Type>::value));
|
||||
|
||||
decltype(data)::const_iterator itr = data.begin();
|
||||
|
||||
|
||||
@ -1599,7 +1599,7 @@ namespace
|
||||
|
||||
auto v = *data.begin();
|
||||
using Type = decltype(v);
|
||||
CHECK((std::is_same_v<Pair, Type>));
|
||||
CHECK((std::is_same<Pair, Type>::value));
|
||||
|
||||
CHECK_EQUAL(0, data.at("0"));
|
||||
CHECK_EQUAL(1, data.at("1"));
|
||||
|
||||
@ -55,10 +55,10 @@ namespace
|
||||
--guard_count;
|
||||
}
|
||||
|
||||
volatile static int guard_count;
|
||||
static int guard_count;
|
||||
};
|
||||
|
||||
volatile int ScopedGuard::guard_count = 0;
|
||||
int ScopedGuard::guard_count = 0;
|
||||
|
||||
//***************************************************************************
|
||||
struct TimerLogEntry
|
||||
|
||||
@ -1620,7 +1620,7 @@ namespace
|
||||
|
||||
auto v = *data.begin();
|
||||
using Type = decltype(v);
|
||||
CHECK((std::is_same_v<Pair, Type>));
|
||||
CHECK((std::is_same<Pair, Type>::value));
|
||||
|
||||
decltype(data)::const_iterator itr = data.begin();
|
||||
|
||||
|
||||
@ -1608,7 +1608,7 @@ namespace
|
||||
|
||||
auto v = *data.begin();
|
||||
using Type = decltype(v);
|
||||
CHECK((std::is_same_v<std::string, Type>));
|
||||
CHECK((std::is_same<std::string, Type>::value));
|
||||
|
||||
decltype(data)::const_iterator itr = data.begin();
|
||||
|
||||
|
||||
@ -38,9 +38,9 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_nth_type)
|
||||
{
|
||||
CHECK((std::is_same_v<etl::nth_type_t<0, int, long, double>, int>));
|
||||
CHECK((std::is_same_v<etl::nth_type_t<1, int, long, double>, long>));
|
||||
CHECK((std::is_same_v<etl::nth_type_t<2, int, long, double>, double>));
|
||||
CHECK((std::is_same<etl::nth_type_t<0, int, long, double>, int>::value));
|
||||
CHECK((std::is_same<etl::nth_type_t<1, int, long, double>, long>::value));
|
||||
CHECK((std::is_same<etl::nth_type_t<2, int, long, double>, double>::value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,8 +31,6 @@ SOFTWARE.
|
||||
#include <string>
|
||||
#include <ostream>
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include "etl/optional.h"
|
||||
#include "etl/vector.h"
|
||||
#include "data.h"
|
||||
|
||||
@ -61,9 +61,9 @@ namespace
|
||||
// Static assert
|
||||
//CHECK_EQUAL(0U, Pack::index_of_type_v<long>);
|
||||
|
||||
CHECK_EQUAL(0U, (etl::parameter_pack<char, char, short, int>::index_of_type<char>::value));
|
||||
CHECK_EQUAL(1U, (etl::parameter_pack<short, char, short, int>::index_of_type<short>::value));
|
||||
CHECK_EQUAL(2U, (etl::parameter_pack<int, char, short, int>::index_of_type<int>::value));
|
||||
CHECK_EQUAL(0U, (etl::parameter_pack<char, short, int>::index_of_type<char>::value));
|
||||
CHECK_EQUAL(1U, (etl::parameter_pack<char, short, int>::index_of_type<short>::value));
|
||||
CHECK_EQUAL(2U, (etl::parameter_pack<char, short, int>::index_of_type<int>::value));
|
||||
|
||||
// Static assert
|
||||
//CHECK_EQUAL(0U, (etl::parameter_pack_v<long, char, short, int>));
|
||||
@ -73,16 +73,16 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_type_from_index)
|
||||
{
|
||||
CHECK((std::is_same_v<char, typename Pack::type_from_index_t<0U>>));
|
||||
CHECK((std::is_same_v<short, typename Pack::type_from_index_t<1U>>));
|
||||
CHECK((std::is_same_v<int, typename Pack::type_from_index_t<2U>>));
|
||||
CHECK((std::is_same<char, typename Pack::type_from_index_t<0U>>::value));
|
||||
CHECK((std::is_same<short, typename Pack::type_from_index_t<1U>>::value));
|
||||
CHECK((std::is_same<int, typename Pack::type_from_index_t<2U>>::value));
|
||||
|
||||
// Static assert
|
||||
//CHECK((std::is_same_v<long, typename Pack::type_from_index_t<3U>>));
|
||||
|
||||
CHECK((std::is_same_v<char, etl::parameter_pack_t<0U, char, short, int>>));
|
||||
CHECK((std::is_same_v<short, etl::parameter_pack_t<1U, char, short, int>>));
|
||||
CHECK((std::is_same_v<int, etl::parameter_pack_t<2U, char, short, int>>));
|
||||
CHECK((std::is_same<char, etl::parameter_pack_t<0U, char, short, int>>::value));
|
||||
CHECK((std::is_same<short, etl::parameter_pack_t<1U, char, short, int>>::value));
|
||||
CHECK((std::is_same<int, etl::parameter_pack_t<2U, char, short, int>>::value));
|
||||
|
||||
// Static assert
|
||||
//CHECK((std::is_same_v<long, etl::parameter_pack_t<3U, char, short, int>>));
|
||||
|
||||
@ -158,7 +158,7 @@ namespace
|
||||
etl::poly_span<Base> s(data);
|
||||
CHECK_EQUAL(sizeof(Derived), s.size_of_element());
|
||||
CHECK(!s.empty());
|
||||
CHECK_EQUAL(std::size(data), s.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.size());
|
||||
CHECK_EQUAL(s.size() * sizeof(Derived), s.size_bytes());
|
||||
CHECK_EQUAL(data[0].value(), s[0].value());
|
||||
CHECK_EQUAL(data[1].value(), s[1].value());
|
||||
@ -173,7 +173,7 @@ namespace
|
||||
etl::poly_span<const Base> s(data);
|
||||
CHECK_EQUAL(sizeof(Derived), s.size_of_element());
|
||||
CHECK(!s.empty());
|
||||
CHECK_EQUAL(std::size(data), s.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.size());
|
||||
CHECK_EQUAL(s.size() * sizeof(Derived), s.size_bytes());
|
||||
CHECK_EQUAL(data[0].value(), s[0].value());
|
||||
CHECK_EQUAL(data[1].value(), s[1].value());
|
||||
@ -185,7 +185,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_poly_span_construct_from_std_array)
|
||||
{
|
||||
std::array data{ Derived(1), Derived(2), Derived(3), Derived(4) };
|
||||
std::array<Derived, 4> data{ Derived(1), Derived(2), Derived(3), Derived(4) };
|
||||
etl::poly_span<Base> s(data);
|
||||
CHECK(!s.empty());
|
||||
CHECK_EQUAL(data.size(), s.size());
|
||||
@ -199,7 +199,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_poly_span_construct_from_const_std_array)
|
||||
{
|
||||
const std::array data{ Derived(1), Derived(2), Derived(3), Derived(4) };
|
||||
const std::array<Derived, 4> data{ Derived(1), Derived(2), Derived(3), Derived(4) };
|
||||
etl::poly_span<const Base> s(data);
|
||||
CHECK(!s.empty());
|
||||
CHECK_EQUAL(data.size(), s.size());
|
||||
@ -214,7 +214,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_poly_span_construct_from_etl_array)
|
||||
{
|
||||
etl::array data{ Derived(1), Derived(2), Derived(3), Derived(4) };
|
||||
etl::array<Derived, 4> data{ Derived(1), Derived(2), Derived(3), Derived(4) };
|
||||
etl::poly_span<Base> s(data);
|
||||
CHECK(!s.empty());
|
||||
CHECK_EQUAL(data.size(), s.size());
|
||||
@ -228,7 +228,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_poly_span_construct_from_const_etl_array)
|
||||
{
|
||||
const etl::array data{ Derived(1), Derived(2), Derived(3), Derived(4) };
|
||||
const etl::array<Derived, 4> data{ Derived(1), Derived(2), Derived(3), Derived(4) };
|
||||
etl::poly_span<const Base> s(data);
|
||||
CHECK(!s.empty());
|
||||
CHECK_EQUAL(data.size(), s.size());
|
||||
@ -483,6 +483,7 @@ namespace
|
||||
CHECK_EQUAL(hashdata, hashview);
|
||||
}
|
||||
|
||||
#if ETL_USING_CPP17
|
||||
//*************************************************************************
|
||||
TEST(test_template_deduction_guide_for_c_array)
|
||||
{
|
||||
@ -490,8 +491,8 @@ namespace
|
||||
|
||||
etl::poly_span s = data;
|
||||
|
||||
CHECK_EQUAL(std::size(data), s.extent);
|
||||
CHECK_EQUAL(std::size(data), s.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.extent);
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.size());
|
||||
CHECK((std::is_same_v<int, std::remove_reference_t<decltype(s.front())>>));
|
||||
}
|
||||
|
||||
@ -503,8 +504,8 @@ namespace
|
||||
|
||||
etl::poly_span s = data;
|
||||
|
||||
CHECK_EQUAL(std::size(data), s.extent);
|
||||
CHECK_EQUAL(std::size(data), s.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.extent);
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.size());
|
||||
CHECK((std::is_same_v<int, std::remove_reference_t<decltype(s.front())>>));
|
||||
}
|
||||
#endif
|
||||
@ -516,8 +517,8 @@ namespace
|
||||
|
||||
etl::poly_span s = data;
|
||||
|
||||
CHECK_EQUAL(std::size(data), s.extent);
|
||||
CHECK_EQUAL(std::size(data), s.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.extent);
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.size());
|
||||
CHECK((std::is_same_v<int, std::remove_reference_t<decltype(s.front())>>));
|
||||
}
|
||||
|
||||
@ -544,5 +545,6 @@ namespace
|
||||
CHECK_EQUAL(4U, s.size());
|
||||
CHECK((std::is_same_v<int, std::remove_reference_t<decltype(s.front())>>));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ namespace
|
||||
etl::poly_span<Base, 4U> s(data);
|
||||
CHECK_EQUAL(sizeof(Derived), s.size_of_element());
|
||||
CHECK(!s.empty());
|
||||
CHECK_EQUAL(std::size(data), s.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.size());
|
||||
CHECK_EQUAL(s.size() * sizeof(Derived), s.size_bytes());
|
||||
CHECK_EQUAL(data[0].value(), s[0].value());
|
||||
CHECK_EQUAL(data[1].value(), s[1].value());
|
||||
@ -173,7 +173,7 @@ namespace
|
||||
etl::poly_span<const Base, 4U> s(data);
|
||||
CHECK_EQUAL(sizeof(Derived), s.size_of_element());
|
||||
CHECK(!s.empty());
|
||||
CHECK_EQUAL(std::size(data), s.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.size());
|
||||
CHECK_EQUAL(s.size() * sizeof(Derived), s.size_bytes());
|
||||
CHECK_EQUAL(data[0].value(), s[0].value());
|
||||
CHECK_EQUAL(data[1].value(), s[1].value());
|
||||
@ -185,7 +185,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_poly_span_construct_from_std_array)
|
||||
{
|
||||
std::array data{ Derived(1), Derived(2), Derived(3), Derived(4) };
|
||||
std::array<Derived, 4> data{ Derived(1), Derived(2), Derived(3), Derived(4) };
|
||||
etl::poly_span<Base, 4U> s(data);
|
||||
CHECK(!s.empty());
|
||||
CHECK_EQUAL(data.size(), s.size());
|
||||
@ -199,7 +199,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_poly_span_construct_from_const_std_array)
|
||||
{
|
||||
const std::array data{ Derived(1), Derived(2), Derived(3), Derived(4) };
|
||||
const std::array<Derived, 4> data{ Derived(1), Derived(2), Derived(3), Derived(4) };
|
||||
etl::poly_span<const Base, 4U> s(data);
|
||||
CHECK(!s.empty());
|
||||
CHECK_EQUAL(data.size(), s.size());
|
||||
@ -214,7 +214,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_poly_span_construct_from_etl_array)
|
||||
{
|
||||
etl::array data{ Derived(1), Derived(2), Derived(3), Derived(4) };
|
||||
etl::array<Derived, 4> data{ Derived(1), Derived(2), Derived(3), Derived(4) };
|
||||
etl::poly_span<Base, 4U> s(data);
|
||||
CHECK(!s.empty());
|
||||
CHECK_EQUAL(data.size(), s.size());
|
||||
@ -228,7 +228,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_poly_span_construct_from_const_etl_array)
|
||||
{
|
||||
const etl::array data{ Derived(1), Derived(2), Derived(3), Derived(4) };
|
||||
const etl::array<Derived, 4> data{ Derived(1), Derived(2), Derived(3), Derived(4) };
|
||||
etl::poly_span<const Base, 4U> s(data);
|
||||
CHECK(!s.empty());
|
||||
CHECK_EQUAL(data.size(), s.size());
|
||||
@ -502,6 +502,7 @@ namespace
|
||||
CHECK_EQUAL(hashdata, hashview);
|
||||
}
|
||||
|
||||
#if ETL_USING_CPP17
|
||||
//*************************************************************************
|
||||
TEST(test_template_deduction_guide_for_c_array)
|
||||
{
|
||||
@ -509,8 +510,8 @@ namespace
|
||||
|
||||
etl::poly_span s = data;
|
||||
|
||||
CHECK_EQUAL(std::size(data), s.extent);
|
||||
CHECK_EQUAL(std::size(data), s.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.extent);
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.size());
|
||||
CHECK((std::is_same_v<int, std::remove_reference_t<decltype(s.front())>>));
|
||||
}
|
||||
|
||||
@ -522,8 +523,8 @@ namespace
|
||||
|
||||
etl::poly_span s = data;
|
||||
|
||||
CHECK_EQUAL(std::size(data), s.extent);
|
||||
CHECK_EQUAL(std::size(data), s.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.extent);
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.size());
|
||||
CHECK((std::is_same_v<int, std::remove_reference_t<decltype(s.front())>>));
|
||||
}
|
||||
#endif
|
||||
@ -535,8 +536,8 @@ namespace
|
||||
|
||||
etl::poly_span s = data;
|
||||
|
||||
CHECK_EQUAL(std::size(data), s.extent);
|
||||
CHECK_EQUAL(std::size(data), s.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.extent);
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.size());
|
||||
CHECK((std::is_same_v<int, std::remove_reference_t<decltype(s.front())>>));
|
||||
}
|
||||
|
||||
@ -563,5 +564,6 @@ namespace
|
||||
CHECK_EQUAL(4U, s.size());
|
||||
CHECK((std::is_same_v<int, std::remove_reference_t<decltype(s.front())>>));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,8 +44,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(integral_signed_average_positive)
|
||||
{
|
||||
using CMA = etl::pseudo_moving_average<int, SAMPLE_SIZE, SCALING>;
|
||||
CMA cma(0);
|
||||
using PMA = etl::pseudo_moving_average<int, SAMPLE_SIZE, SCALING>;
|
||||
PMA cma(0);
|
||||
|
||||
CHECK_EQUAL(0, cma.value());
|
||||
|
||||
@ -65,10 +65,10 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(integral_signed_average_positive_via_iterator)
|
||||
{
|
||||
std::array<int, 10> data{ 9, 1, 8, 2, 7, 3, 6, 4, 5 };
|
||||
std::array<int, 9> data{ 9, 1, 8, 2, 7, 3, 6, 4, 5 };
|
||||
|
||||
using CMA = etl::pseudo_moving_average<int, SAMPLE_SIZE, SCALING>;
|
||||
CMA cma(0);
|
||||
using PMA = etl::pseudo_moving_average<int, SAMPLE_SIZE, SCALING>;
|
||||
PMA cma(0);
|
||||
|
||||
CHECK_EQUAL(0, cma.value());
|
||||
|
||||
@ -80,8 +80,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(integral_signed_average_negative)
|
||||
{
|
||||
using CMA = etl::pseudo_moving_average<int, SAMPLE_SIZE, SCALING>;
|
||||
CMA cma(0);
|
||||
using PMA = etl::pseudo_moving_average<int, SAMPLE_SIZE, SCALING>;
|
||||
PMA cma(0);
|
||||
|
||||
CHECK_EQUAL(0, cma.value());
|
||||
|
||||
@ -101,10 +101,10 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(integral_signed_average_negative_via_iterator)
|
||||
{
|
||||
std::array<int, 10> data{ -9, -1, -8, -2, -7, -3, -6, -4, -5 };
|
||||
std::array<int, 9> data{ -9, -1, -8, -2, -7, -3, -6, -4, -5 };
|
||||
|
||||
using CMA = etl::pseudo_moving_average<int, SAMPLE_SIZE, SCALING>;
|
||||
CMA cma(0);
|
||||
using PMA = etl::pseudo_moving_average<int, SAMPLE_SIZE, SCALING>;
|
||||
PMA cma(0);
|
||||
|
||||
CHECK_EQUAL(0, cma.value());
|
||||
|
||||
@ -116,8 +116,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(integral_unsigned_average_positive)
|
||||
{
|
||||
using CMA = etl::pseudo_moving_average<unsigned int, SAMPLE_SIZE, SCALING>;
|
||||
CMA cma(0U);
|
||||
using PMA = etl::pseudo_moving_average<unsigned int, SAMPLE_SIZE, SCALING>;
|
||||
PMA cma(0U);
|
||||
|
||||
CHECK_EQUAL(0U, cma.value());
|
||||
|
||||
@ -137,10 +137,10 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(integral_unsigned_average_positive_via_iterator)
|
||||
{
|
||||
std::array<unsigned int, 10> data{ 9U, 1U, 8U, 2U, 7U, 3U, 6U, 4U, 5U };
|
||||
std::array<unsigned int, 9> data{ 9U, 1U, 8U, 2U, 7U, 3U, 6U, 4U, 5U };
|
||||
|
||||
using CMA = etl::pseudo_moving_average<unsigned int, SAMPLE_SIZE, SCALING>;
|
||||
CMA cma(0U);
|
||||
using PMA = etl::pseudo_moving_average<unsigned int, SAMPLE_SIZE, SCALING>;
|
||||
PMA cma(0U);
|
||||
|
||||
CHECK_EQUAL(0U, cma.value());
|
||||
|
||||
@ -152,8 +152,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(integral_signed_average_positive_runtime_sample_size)
|
||||
{
|
||||
using CMA = etl::pseudo_moving_average<int, 0U, SCALING>;
|
||||
CMA cma(0, SAMPLE_SIZE * 2U);
|
||||
using PMA = etl::pseudo_moving_average<int, 0U, SCALING>;
|
||||
PMA cma(0, SAMPLE_SIZE * 2U);
|
||||
|
||||
CHECK_EQUAL(0, cma.value());
|
||||
|
||||
@ -175,10 +175,10 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(integral_signed_average_positive_runtime_sample_size_via_iterator)
|
||||
{
|
||||
std::array<int, 10> data{ 9, 1, 8, 2, 7, 3, 6, 4, 5 };
|
||||
std::array<int, 9> data{ 9, 1, 8, 2, 7, 3, 6, 4, 5 };
|
||||
|
||||
using CMA = etl::pseudo_moving_average<int, 0U, SCALING>;
|
||||
CMA cma(0, SAMPLE_SIZE * 2U);
|
||||
using PMA = etl::pseudo_moving_average<int, 0U, SCALING>;
|
||||
PMA cma(0, SAMPLE_SIZE * 2U);
|
||||
|
||||
CHECK_EQUAL(0, cma.value());
|
||||
|
||||
@ -192,8 +192,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(integral_signed_average_negative_runtime_sample_size)
|
||||
{
|
||||
using CMA = etl::pseudo_moving_average<int, 0U, SCALING>;
|
||||
CMA cma(0, SAMPLE_SIZE * 2U);
|
||||
using PMA = etl::pseudo_moving_average<int, 0U, SCALING>;
|
||||
PMA cma(0, SAMPLE_SIZE * 2U);
|
||||
|
||||
CHECK_EQUAL(0, cma.value());
|
||||
|
||||
@ -215,10 +215,10 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(integral_signed_average_negative_runtime_sample_size_via_iterator)
|
||||
{
|
||||
std::array<int, 10> data{ -9, -1, -8, -2, -7, -3, -6, -4, -5 };
|
||||
std::array<int, 9> data{ -9, -1, -8, -2, -7, -3, -6, -4, -5 };
|
||||
|
||||
using CMA = etl::pseudo_moving_average<int, 0U, SCALING>;
|
||||
CMA cma(0, SAMPLE_SIZE * 2U);
|
||||
using PMA = etl::pseudo_moving_average<int, 0U, SCALING>;
|
||||
PMA cma(0, SAMPLE_SIZE * 2U);
|
||||
|
||||
CHECK_EQUAL(0, cma.value());
|
||||
|
||||
@ -232,8 +232,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(integral_unsigned_average_positive_runtime_sample_size)
|
||||
{
|
||||
using CMA = etl::pseudo_moving_average<unsigned int, 0U, SCALING>;
|
||||
CMA cma(0U, SAMPLE_SIZE * 2U);
|
||||
using PMA = etl::pseudo_moving_average<unsigned int, 0U, SCALING>;
|
||||
PMA cma(0U, SAMPLE_SIZE * 2U);
|
||||
|
||||
CHECK_EQUAL(0U, cma.value());
|
||||
|
||||
@ -255,10 +255,10 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(integral_unsigned_average_positive_runtime_sample_size_via_iterator)
|
||||
{
|
||||
std::array<unsigned int, 10> data{ 9U, 1U, 8U, 2U, 7U, 3U, 6U, 4U, 5U };
|
||||
std::array<unsigned int, 9> data{ 9U, 1U, 8U, 2U, 7U, 3U, 6U, 4U, 5U };
|
||||
|
||||
using CMA = etl::pseudo_moving_average<int, 0U, SCALING>;
|
||||
CMA cma(0U, SAMPLE_SIZE * 2U);
|
||||
using PMA = etl::pseudo_moving_average<int, 0U, SCALING>;
|
||||
PMA cma(0U, SAMPLE_SIZE * 2U);
|
||||
|
||||
CHECK_EQUAL(0U, cma.value());
|
||||
|
||||
@ -272,8 +272,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(floating_point_average)
|
||||
{
|
||||
using CMA = etl::pseudo_moving_average<double, SAMPLE_SIZE>;
|
||||
CMA cma(0);
|
||||
using PMA = etl::pseudo_moving_average<double, SAMPLE_SIZE>;
|
||||
PMA cma(0);
|
||||
|
||||
CHECK_EQUAL(0.0, cma.value());
|
||||
|
||||
@ -293,10 +293,10 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(floating_point_average_via_iterator)
|
||||
{
|
||||
std::array<double, 10> data{ 9.0, 1.0, 8.0, 2.0, 7.0, 3.0, 6.0, 4.0, 5.0 };
|
||||
std::array<double, 9> data{ 9.0, 1.0, 8.0, 2.0, 7.0, 3.0, 6.0, 4.0, 5.0 };
|
||||
|
||||
using CMA = etl::pseudo_moving_average<double, SAMPLE_SIZE>;
|
||||
CMA cma(0);
|
||||
using PMA = etl::pseudo_moving_average<double, SAMPLE_SIZE>;
|
||||
PMA cma(0);
|
||||
|
||||
CHECK_EQUAL(0.0, cma.value());
|
||||
|
||||
@ -308,8 +308,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(floating_point_average_runtime_sample_size)
|
||||
{
|
||||
using CMA = etl::pseudo_moving_average<double, 0U>;
|
||||
CMA cma(0, SAMPLE_SIZE * 2);
|
||||
using PMA = etl::pseudo_moving_average<double, 0U>;
|
||||
PMA cma(0, SAMPLE_SIZE * 2);
|
||||
|
||||
CHECK_EQUAL(0.0, cma.value());
|
||||
|
||||
@ -331,10 +331,10 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(floating_point_average_runtime_sample_size_via_iterator)
|
||||
{
|
||||
std::array<double, 10> data{ 9.0, 1.0, 8.0, 2.0, 7.0, 3.0, 6.0, 4.0, 5.0 };
|
||||
std::array<double, 9> data{ 9.0, 1.0, 8.0, 2.0, 7.0, 3.0, 6.0, 4.0, 5.0 };
|
||||
|
||||
using CMA = etl::pseudo_moving_average<double, 0U>;
|
||||
CMA cma(0, SAMPLE_SIZE * 2);
|
||||
using PMA = etl::pseudo_moving_average<double, 0U>;
|
||||
PMA cma(0, SAMPLE_SIZE * 2);
|
||||
|
||||
CHECK_EQUAL(0.0, cma.value());
|
||||
|
||||
|
||||
@ -1417,7 +1417,7 @@ namespace
|
||||
|
||||
auto v = *data.begin();
|
||||
using Type = decltype(v);
|
||||
CHECK((std::is_same_v<std::string, Type>));
|
||||
CHECK((std::is_same<std::string, Type>::value));
|
||||
|
||||
decltype(data)::const_iterator itr = data.begin();
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test1)
|
||||
{
|
||||
CHECK((std::is_same_v<Test_Singleton::type, Test_Class>));
|
||||
CHECK((std::is_same<Test_Singleton::type, Test_Class>::value));
|
||||
|
||||
CHECK(!Test_Singleton::is_valid());
|
||||
CHECK_THROW(Test_Singleton::instance(), etl::singleton_not_created);
|
||||
|
||||
@ -630,6 +630,7 @@ namespace
|
||||
CHECK_EQUAL(hashdata, hashcview);
|
||||
}
|
||||
|
||||
#if ETL_USING_CPP17
|
||||
//*************************************************************************
|
||||
TEST(test_template_deduction_guide_for_c_array)
|
||||
{
|
||||
@ -637,8 +638,8 @@ namespace
|
||||
|
||||
etl::span s = data;
|
||||
|
||||
CHECK_EQUAL(std::size(data), s.extent);
|
||||
CHECK_EQUAL(std::size(data), s.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.extent);
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.size());
|
||||
CHECK((std::is_same_v<int, std::remove_reference_t<decltype(s.front())>>));
|
||||
}
|
||||
|
||||
@ -650,8 +651,8 @@ namespace
|
||||
|
||||
etl::span s = data;
|
||||
|
||||
CHECK_EQUAL(std::size(data), s.extent);
|
||||
CHECK_EQUAL(std::size(data), s.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.extent);
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.size());
|
||||
CHECK((std::is_same_v<int, std::remove_reference_t<decltype(s.front())>>));
|
||||
}
|
||||
#endif
|
||||
@ -663,8 +664,8 @@ namespace
|
||||
|
||||
etl::span s = data;
|
||||
|
||||
CHECK_EQUAL(std::size(data), s.extent);
|
||||
CHECK_EQUAL(std::size(data), s.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.extent);
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.size());
|
||||
CHECK((std::is_same_v<int, std::remove_reference_t<decltype(s.front())>>));
|
||||
}
|
||||
|
||||
@ -691,6 +692,7 @@ namespace
|
||||
CHECK_EQUAL(4U, s.size());
|
||||
CHECK((std::is_same_v<int, std::remove_reference_t<decltype(s.front())>>));
|
||||
}
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
void f_issue_481(etl::span<const char, 10>)
|
||||
@ -761,8 +763,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_circular_iterator_pre_increment)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
|
||||
|
||||
View view{ data };
|
||||
|
||||
@ -777,8 +779,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_circular_iterator_pre_increment_for_subspan)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2 };
|
||||
|
||||
View view{ data };
|
||||
View subspan = view.subspan<2, 4>();
|
||||
@ -794,8 +796,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_circular_iterator_post_increment)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
|
||||
View view{ data };
|
||||
|
||||
@ -803,15 +805,15 @@ namespace
|
||||
|
||||
for (int i = 0; i < 20; ++i)
|
||||
{
|
||||
CHECK_EQUAL(expected[i % std::size(expected)], *sci++);
|
||||
CHECK_EQUAL(expected[i % ETL_OR_STD::size(expected)], *sci++);
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_circular_iterator_post_increment_for_subspan)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5 };
|
||||
|
||||
View view{ data };
|
||||
View subspan = view.subspan<2, 4>();
|
||||
@ -827,8 +829,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_circular_reverse_iterator_pre_increment)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9 };
|
||||
|
||||
View view{ data };
|
||||
|
||||
@ -836,15 +838,15 @@ namespace
|
||||
|
||||
for (int i = 0; i < 20; ++i)
|
||||
{
|
||||
CHECK_EQUAL(expected[i % std::size(expected)], *++sci);
|
||||
CHECK_EQUAL(expected[i % ETL_OR_STD::size(expected)], *++sci);
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_circular_reverse_iterator_pre_increment_for_subspan)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5 };
|
||||
|
||||
View view{ data };
|
||||
View subspan = view.subspan<2, 4>();
|
||||
@ -853,15 +855,15 @@ namespace
|
||||
|
||||
for (int i = 0; i < 20; ++i)
|
||||
{
|
||||
CHECK_EQUAL(expected[i % std::size(expected)], *++sci);
|
||||
CHECK_EQUAL(expected[i % ETL_OR_STD::size(expected)], *++sci);
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_circular_reverse_iterator_post_increment)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
|
||||
|
||||
View view{ data };
|
||||
|
||||
@ -869,15 +871,15 @@ namespace
|
||||
|
||||
for (int i = 0; i < 20; ++i)
|
||||
{
|
||||
CHECK_EQUAL(expected[i % std::size(expected)], *sci++);
|
||||
CHECK_EQUAL(expected[i % ETL_OR_STD::size(expected)], *sci++);
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_circular_reverse_iterator_post_increment_for_subspan)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2 };
|
||||
|
||||
View view{ data };
|
||||
View subspan = view.subspan<2, 4>();
|
||||
@ -886,15 +888,15 @@ namespace
|
||||
|
||||
for (int i = 0; i < 20; ++i)
|
||||
{
|
||||
CHECK_EQUAL(expected[i % std::size(expected)], *sci++);
|
||||
CHECK_EQUAL(expected[i % ETL_OR_STD::size(expected)], *sci++);
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_operator_plus_equals)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
|
||||
View view{ data };
|
||||
|
||||
@ -913,8 +915,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_operator_plus)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
|
||||
View view{ data };
|
||||
|
||||
@ -933,8 +935,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_operator_minus_equals)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 0, 9, 8, 7, 6, 5, 4, 3, 2, 1 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 0, 9, 8, 7, 6, 5, 4, 3, 2, 1 };
|
||||
|
||||
View view{ data };
|
||||
|
||||
@ -953,8 +955,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_operator_minus)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 0, 9, 8, 7, 6, 5, 4, 3, 2, 1 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 0, 9, 8, 7, 6, 5, 4, 3, 2, 1 };
|
||||
|
||||
View view{ data };
|
||||
|
||||
@ -973,10 +975,10 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_operator_equality)
|
||||
{
|
||||
etl::array data1{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array data2{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array data3{ 0, 1, 2, 3, 4, 4, 6, 7, 8, 9 };
|
||||
etl::array data4{ 0, 1, 2, 3, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data1{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data2{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data3{ 0, 1, 2, 3, 4, 4, 6, 7, 8, 9 };
|
||||
etl::array<int, 9> data4{ 0, 1, 2, 3, 5, 6, 7, 8, 9 };
|
||||
|
||||
int i;
|
||||
|
||||
@ -1011,10 +1013,10 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_operator_equality_one_is_const)
|
||||
{
|
||||
etl::array data1{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array data2{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array data3{ 0, 1, 2, 3, 4, 4, 6, 7, 8, 9 };
|
||||
etl::array data4{ 0, 1, 2, 3, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data1{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data2{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data3{ 0, 1, 2, 3, 4, 4, 6, 7, 8, 9 };
|
||||
etl::array<int, 9> data4{ 0, 1, 2, 3, 5, 6, 7, 8, 9 };
|
||||
|
||||
int i;
|
||||
|
||||
@ -1049,10 +1051,10 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_operator_not_equal)
|
||||
{
|
||||
etl::array data1{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
|
||||
etl::array data2{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
|
||||
etl::array data3{ 0, 1, 2, 3, 4, 4, 6, 7, 8, 9 };
|
||||
etl::array data4{ 0, 1, 2, 3, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data1{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data2{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data3{ 0, 1, 2, 3, 4, 4, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data4{ 0, 1, 2, 3, 5, 6, 7, 8, 9 };
|
||||
|
||||
int i;
|
||||
|
||||
@ -1087,10 +1089,10 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_operator_not_equal_one_is_const)
|
||||
{
|
||||
etl::array data1{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array data2{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array data3{ 0, 1, 2, 3, 4, 4, 6, 7, 8, 9 };
|
||||
etl::array data4{ 0, 1, 2, 3, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data1{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data2{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data3{ 0, 1, 2, 3, 4, 4, 6, 7, 8, 9 };
|
||||
etl::array<int, 9> data4{ 0, 1, 2, 3, 5, 6, 7, 8, 9 };
|
||||
|
||||
int i;
|
||||
|
||||
|
||||
@ -620,6 +620,7 @@ namespace
|
||||
CHECK_EQUAL(hashdata, hashcview);
|
||||
}
|
||||
|
||||
#if ETL_USING_CPP17
|
||||
//*************************************************************************
|
||||
TEST(test_template_deduction_guide_for_c_array)
|
||||
{
|
||||
@ -627,8 +628,8 @@ namespace
|
||||
|
||||
etl::span s = data;
|
||||
|
||||
CHECK_EQUAL(std::size(data), s.extent);
|
||||
CHECK_EQUAL(std::size(data), s.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.extent);
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.size());
|
||||
CHECK((std::is_same_v<int, std::remove_reference_t<decltype(s.front())>>));
|
||||
}
|
||||
|
||||
@ -640,8 +641,8 @@ namespace
|
||||
|
||||
etl::span s = data;
|
||||
|
||||
CHECK_EQUAL(std::size(data), s.extent);
|
||||
CHECK_EQUAL(std::size(data), s.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.extent);
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.size());
|
||||
CHECK((std::is_same_v<int, std::remove_reference_t<decltype(s.front())>>));
|
||||
}
|
||||
#endif
|
||||
@ -653,8 +654,8 @@ namespace
|
||||
|
||||
etl::span s = data;
|
||||
|
||||
CHECK_EQUAL(std::size(data), s.extent);
|
||||
CHECK_EQUAL(std::size(data), s.size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.extent);
|
||||
CHECK_EQUAL(ETL_OR_STD::size(data), s.size());
|
||||
CHECK((std::is_same_v<int, std::remove_reference_t<decltype(s.front())>>));
|
||||
}
|
||||
|
||||
@ -681,6 +682,7 @@ namespace
|
||||
CHECK_EQUAL(4U, s.size());
|
||||
CHECK((std::is_same_v<int, std::remove_reference_t<decltype(s.front())>>));
|
||||
}
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
void f_issue_481(etl::span<const char, 10>)
|
||||
@ -751,8 +753,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_circular_iterator_pre_increment)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
|
||||
|
||||
View view{ data };
|
||||
|
||||
@ -767,8 +769,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_circular_iterator_pre_increment_for_subspan)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2 };
|
||||
|
||||
View view{ data };
|
||||
etl::span<int, 4U> subspan = view.subspan<2, 4>();
|
||||
@ -784,8 +786,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_circular_iterator_post_increment)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
|
||||
View view{ data };
|
||||
|
||||
@ -793,15 +795,15 @@ namespace
|
||||
|
||||
for (int i = 0; i < 20; ++i)
|
||||
{
|
||||
CHECK_EQUAL(expected[i % std::size(expected)], *sci++);
|
||||
CHECK_EQUAL(expected[i % ETL_OR_STD::size(expected)], *sci++);
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_circular_iterator_post_increment_for_subspan)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5 };
|
||||
|
||||
View view{ data };
|
||||
etl::span<int, 4U> subspan = view.subspan<2, 4>();
|
||||
@ -817,8 +819,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_circular_reverse_iterator_pre_increment)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9 };
|
||||
|
||||
View view{ data };
|
||||
|
||||
@ -826,15 +828,15 @@ namespace
|
||||
|
||||
for (int i = 0; i < 20; ++i)
|
||||
{
|
||||
CHECK_EQUAL(expected[i % std::size(expected)], *++sci);
|
||||
CHECK_EQUAL(expected[i % ETL_OR_STD::size(expected)], *++sci);
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_circular_reverse_iterator_pre_increment_for_subspan)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5 };
|
||||
|
||||
View view{ data };
|
||||
etl::span<int, 4U> subspan = view.subspan<2, 4>();
|
||||
@ -843,15 +845,15 @@ namespace
|
||||
|
||||
for (int i = 0; i < 20; ++i)
|
||||
{
|
||||
CHECK_EQUAL(expected[i % std::size(expected)], *++sci);
|
||||
CHECK_EQUAL(expected[i % ETL_OR_STD::size(expected)], *++sci);
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_circular_reverse_iterator_post_increment)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
|
||||
|
||||
View view{ data };
|
||||
|
||||
@ -859,15 +861,15 @@ namespace
|
||||
|
||||
for (int i = 0; i < 20; ++i)
|
||||
{
|
||||
CHECK_EQUAL(expected[i % std::size(expected)], *sci++);
|
||||
CHECK_EQUAL(expected[i % ETL_OR_STD::size(expected)], *sci++);
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_circular_reverse_iterator_post_increment_for_subspan)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2, 5, 4, 3, 2 };
|
||||
|
||||
View view{ data };
|
||||
etl::span<int, 4U> subspan = view.subspan<2, 4>();
|
||||
@ -876,15 +878,15 @@ namespace
|
||||
|
||||
for (int i = 0; i < 20; ++i)
|
||||
{
|
||||
CHECK_EQUAL(expected[i % std::size(expected)], *sci++);
|
||||
CHECK_EQUAL(expected[i % ETL_OR_STD::size(expected)], *sci++);
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_operator_plus_equals)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 20> expected{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
|
||||
View view{ data };
|
||||
|
||||
@ -903,8 +905,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_operator_plus)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> expected{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
|
||||
View view{ data };
|
||||
|
||||
@ -923,8 +925,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_operator_minus_equals)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 0, 9, 8, 7, 6, 5, 4, 3, 2, 1 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> expected{ 0, 9, 8, 7, 6, 5, 4, 3, 2, 1 };
|
||||
|
||||
View view{ data };
|
||||
|
||||
@ -943,8 +945,8 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_operator_minus)
|
||||
{
|
||||
etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array expected{ 0, 9, 8, 7, 6, 5, 4, 3, 2, 1 };
|
||||
etl::array<int, 10> data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> expected{ 0, 9, 8, 7, 6, 5, 4, 3, 2, 1 };
|
||||
|
||||
View view{ data };
|
||||
|
||||
@ -963,9 +965,9 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_operator_equality)
|
||||
{
|
||||
etl::array data1{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array data2{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array data3{ 0, 1, 2, 3, 4, 4, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data1{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data2{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data3{ 0, 1, 2, 3, 4, 4, 6, 7, 8, 9 };
|
||||
|
||||
View view1{ data1 };
|
||||
View view2{ data1 };
|
||||
@ -990,9 +992,9 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_operator_equality_one_is_const)
|
||||
{
|
||||
etl::array data1{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array data2{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array data3{ 0, 1, 2, 3, 4, 4, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data1{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data2{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data3{ 0, 1, 2, 3, 4, 4, 6, 7, 8, 9 };
|
||||
|
||||
View view1{ data1 };
|
||||
CView view2{ data1 };
|
||||
@ -1017,9 +1019,9 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_operator_not_equal)
|
||||
{
|
||||
etl::array data1{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array data2{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array data3{ 0, 1, 2, 3, 4, 4, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data1{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data2{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data3{ 0, 1, 2, 3, 4, 4, 6, 7, 8, 9 };
|
||||
|
||||
View view1{ data1 };
|
||||
View view2{ data1 };
|
||||
@ -1044,9 +1046,9 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_operator_not_equal_one_is_const)
|
||||
{
|
||||
etl::array data1{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array data2{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array data3{ 0, 1, 2, 3, 4, 4, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data1{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data2{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
etl::array<int, 10> data3{ 0, 1, 2, 3, 4, 4, 6, 7, 8, 9 };
|
||||
|
||||
View view1{ data1 };
|
||||
CView view2{ data1 };
|
||||
|
||||
@ -152,12 +152,12 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_default_constructor_use_array_buffer)
|
||||
{
|
||||
Text text(array_text, std::size(array_text));
|
||||
Text text(array_text, ETL_OR_STD::size(array_text));
|
||||
|
||||
CHECK_EQUAL(0U, text.size());
|
||||
CHECK(text.empty());
|
||||
CHECK_EQUAL(std::size(array_text) - 1, text.capacity());
|
||||
CHECK_EQUAL(std::size(array_text) - 1, text.max_size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(array_text) - 1, text.capacity());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(array_text) - 1, text.max_size());
|
||||
CHECK(text.begin() == text.end());
|
||||
#if ETL_HAS_STRING_TRUNCATION_CHECKS
|
||||
CHECK(!text.is_truncated());
|
||||
@ -167,12 +167,12 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_default_constructor_use_array_buffer_text)
|
||||
{
|
||||
Text text(array_text, array_text, std::size(array_text));
|
||||
Text text(array_text, array_text, ETL_OR_STD::size(array_text));
|
||||
|
||||
CHECK_EQUAL(text.size(), etl::strlen(array_text));
|
||||
CHECK(!text.empty());
|
||||
CHECK_EQUAL(std::size(array_text) - 1, text.capacity());
|
||||
CHECK_EQUAL(std::size(array_text) - 1, text.max_size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(array_text) - 1, text.capacity());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(array_text) - 1, text.max_size());
|
||||
CHECK(text.begin() != text.end());
|
||||
#if ETL_HAS_STRING_TRUNCATION_CHECKS
|
||||
CHECK(!text.is_truncated());
|
||||
|
||||
@ -66,12 +66,12 @@ namespace
|
||||
{
|
||||
static const size_t SIZE = 11;
|
||||
|
||||
typedef etl::u16string<SIZE> Text;
|
||||
typedef etl::iu16string IText;
|
||||
typedef std::u16string Compare_Text;
|
||||
typedef Text::value_type value_t;
|
||||
typedef etl::u16string<52> TextL;
|
||||
typedef etl::u16string<4> TextS;
|
||||
using Text = etl::u16string<SIZE>;
|
||||
using IText = etl::iu16string;
|
||||
using Compare_Text = std::u16string;
|
||||
using value_t = Text::value_type;
|
||||
using TextL = etl::u16string<52>;
|
||||
using TextS = etl::u16string<4>;
|
||||
|
||||
Compare_Text initial_text;
|
||||
Compare_Text less_text;
|
||||
@ -601,7 +601,6 @@ namespace
|
||||
CHECK_EQUAL(&constText[0], constText.begin());
|
||||
}
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_end)
|
||||
{
|
||||
|
||||
@ -74,10 +74,9 @@ namespace
|
||||
using TextT = etl::u16string<SIZE>;
|
||||
using Compare_Text = std::u16string;
|
||||
using value_t = Text::value_type;
|
||||
|
||||
using TextBuffer = std::array<IText::value_type, SIZE + 1>;
|
||||
using TextBufferL = std::array<IText::value_type, SIZE_L + 1>;
|
||||
using TextBufferS = std::array<IText::value_type, SIZE_S + 1>;
|
||||
using TextBuffer = std::array<IText::value_type, SIZE + 1>;
|
||||
using TextBufferL = std::array<IText::value_type, SIZE_L + 1>;
|
||||
using TextBufferS = std::array<IText::value_type, SIZE_S + 1>;
|
||||
|
||||
Compare_Text initial_text;
|
||||
Compare_Text less_text;
|
||||
@ -168,12 +167,12 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_default_constructor_use_array_buffer)
|
||||
{
|
||||
Text text(array_text, std::size(array_text));
|
||||
Text text(array_text, ETL_OR_STD::size(array_text));
|
||||
|
||||
CHECK_EQUAL(0U, text.size());
|
||||
CHECK(text.empty());
|
||||
CHECK_EQUAL(std::size(array_text) - 1, text.capacity());
|
||||
CHECK_EQUAL(std::size(array_text) - 1, text.max_size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(array_text) - 1, text.capacity());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(array_text) - 1, text.max_size());
|
||||
CHECK(text.begin() == text.end());
|
||||
#if ETL_HAS_STRING_TRUNCATION_CHECKS
|
||||
CHECK(!text.is_truncated());
|
||||
@ -183,12 +182,12 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_default_constructor_use_array_buffer_text)
|
||||
{
|
||||
Text text(array_text, array_text, std::size(array_text));
|
||||
Text text(array_text, array_text, ETL_OR_STD::size(array_text));
|
||||
|
||||
CHECK_EQUAL(text.size(), etl::strlen(array_text));
|
||||
CHECK(!text.empty());
|
||||
CHECK_EQUAL(std::size(array_text) - 1, text.capacity());
|
||||
CHECK_EQUAL(std::size(array_text) - 1, text.max_size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(array_text) - 1, text.capacity());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(array_text) - 1, text.max_size());
|
||||
CHECK(text.begin() != text.end());
|
||||
#if ETL_HAS_STRING_TRUNCATION_CHECKS
|
||||
CHECK(!text.is_truncated());
|
||||
@ -735,7 +734,7 @@ namespace
|
||||
TextBuffer buffer2;
|
||||
const Text constText(initial_text.c_str(), buffer2.data(), buffer2.size());
|
||||
|
||||
CHECK_EQUAL(&text[0], text.begin());
|
||||
CHECK_EQUAL(&text[0], text.begin());
|
||||
CHECK_EQUAL(&constText[0], constText.begin());
|
||||
}
|
||||
|
||||
@ -749,7 +748,7 @@ namespace
|
||||
TextBuffer buffer2;
|
||||
const Text constText(initial_text.c_str(), buffer2.data(), buffer2.size());
|
||||
|
||||
CHECK_EQUAL(&text[initial_text.size()], text.end());
|
||||
CHECK_EQUAL(&text[initial_text.size()], text.end());
|
||||
CHECK_EQUAL(&constText[initial_text.size()], constText.end());
|
||||
}
|
||||
|
||||
|
||||
@ -66,12 +66,12 @@ namespace
|
||||
{
|
||||
static const size_t SIZE = 11;
|
||||
|
||||
typedef etl::u32string<SIZE> Text;
|
||||
typedef etl::iu32string IText;
|
||||
typedef std::u32string Compare_Text;
|
||||
typedef Text::value_type value_t;
|
||||
typedef etl::u32string<52> TextL;
|
||||
typedef etl::u32string<4> TextS;
|
||||
using Text = etl::u32string<SIZE>;
|
||||
using IText = etl::iu32string;
|
||||
using Compare_Text = std::u32string;
|
||||
using value_t = Text::value_type;
|
||||
using TextL = etl::u32string<52>;
|
||||
using TextS = etl::u32string<4>;
|
||||
|
||||
Compare_Text initial_text;
|
||||
Compare_Text less_text;
|
||||
@ -595,20 +595,19 @@ namespace
|
||||
TEST_FIXTURE(SetupFixture, test_begin)
|
||||
{
|
||||
Text text(initial_text.c_str());
|
||||
const Text constText(initial_text.c_str());
|
||||
const Text constText(initial_text.c_str());
|
||||
|
||||
CHECK_EQUAL(&text[0], text.begin());
|
||||
CHECK_EQUAL(&text[0], text.begin());
|
||||
CHECK_EQUAL(&constText[0], constText.begin());
|
||||
}
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_end)
|
||||
{
|
||||
Text text(initial_text.c_str());
|
||||
const Text constText(initial_text.c_str());
|
||||
|
||||
CHECK_EQUAL(&text[initial_text.size()], text.end());
|
||||
CHECK_EQUAL(&text[initial_text.size()], text.end());
|
||||
CHECK_EQUAL(&constText[initial_text.size()], constText.end());
|
||||
}
|
||||
|
||||
|
||||
@ -74,10 +74,9 @@ namespace
|
||||
using TextT = etl::u32string<SIZE>;
|
||||
using Compare_Text = std::u32string;
|
||||
using value_t = Text::value_type;
|
||||
|
||||
using TextBuffer = std::array<IText::value_type, SIZE + 1>;
|
||||
using TextBufferL = std::array<IText::value_type, SIZE_L + 1>;
|
||||
using TextBufferS = std::array<IText::value_type, SIZE_S + 1>;
|
||||
using TextBuffer = std::array<IText::value_type, SIZE + 1>;
|
||||
using TextBufferL = std::array<IText::value_type, SIZE_L + 1>;
|
||||
using TextBufferS = std::array<IText::value_type, SIZE_S + 1>;
|
||||
|
||||
Compare_Text initial_text;
|
||||
Compare_Text less_text;
|
||||
@ -168,12 +167,12 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_default_constructor_use_array_buffer)
|
||||
{
|
||||
Text text(array_text, std::size(array_text));
|
||||
Text text(array_text, ETL_OR_STD::size(array_text));
|
||||
|
||||
CHECK_EQUAL(0U, text.size());
|
||||
CHECK(text.empty());
|
||||
CHECK_EQUAL(std::size(array_text) - 1, text.capacity());
|
||||
CHECK_EQUAL(std::size(array_text) - 1, text.max_size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(array_text) - 1, text.capacity());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(array_text) - 1, text.max_size());
|
||||
CHECK(text.begin() == text.end());
|
||||
#if ETL_HAS_STRING_TRUNCATION_CHECKS
|
||||
CHECK(!text.is_truncated());
|
||||
@ -183,12 +182,12 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_default_constructor_use_array_buffer_text)
|
||||
{
|
||||
Text text(array_text, array_text, std::size(array_text));
|
||||
Text text(array_text, array_text, ETL_OR_STD::size(array_text));
|
||||
|
||||
CHECK_EQUAL(text.size(), etl::strlen(array_text));
|
||||
CHECK(!text.empty());
|
||||
CHECK_EQUAL(std::size(array_text) - 1, text.capacity());
|
||||
CHECK_EQUAL(std::size(array_text) - 1, text.max_size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(array_text) - 1, text.capacity());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(array_text) - 1, text.max_size());
|
||||
CHECK(text.begin() != text.end());
|
||||
#if ETL_HAS_STRING_TRUNCATION_CHECKS
|
||||
CHECK(!text.is_truncated());
|
||||
@ -735,11 +734,10 @@ namespace
|
||||
TextBuffer buffer2;
|
||||
const Text constText(initial_text.c_str(), buffer2.data(), buffer2.size());
|
||||
|
||||
CHECK_EQUAL(&text[0], text.begin());
|
||||
CHECK_EQUAL(&text[0], text.begin());
|
||||
CHECK_EQUAL(&constText[0], constText.begin());
|
||||
}
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_end)
|
||||
{
|
||||
@ -749,7 +747,7 @@ namespace
|
||||
TextBuffer buffer2;
|
||||
const Text constText(initial_text.c_str(), buffer2.data(), buffer2.size());
|
||||
|
||||
CHECK_EQUAL(&text[initial_text.size()], text.end());
|
||||
CHECK_EQUAL(&text[initial_text.size()], text.end());
|
||||
CHECK_EQUAL(&constText[initial_text.size()], constText.end());
|
||||
}
|
||||
|
||||
|
||||
@ -26,6 +26,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
#include "etl/platform.h"
|
||||
#if ETL_USING_CPP17
|
||||
|
||||
#include "unit_test_framework.h"
|
||||
|
||||
#include <string>
|
||||
@ -1613,3 +1616,5 @@ namespace
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@ -26,6 +26,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
#include "etl/platform.h"
|
||||
#if ETL_USING_CPP17
|
||||
|
||||
#include "unit_test_framework.h"
|
||||
|
||||
#include <string>
|
||||
@ -1588,3 +1591,5 @@ namespace
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@ -26,6 +26,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
#include "etl/platform.h"
|
||||
#if ETL_USING_CPP17
|
||||
|
||||
#include "unit_test_framework.h"
|
||||
|
||||
#include <string>
|
||||
@ -1586,3 +1589,5 @@ namespace
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@ -26,6 +26,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
#include "etl/platform.h"
|
||||
#if ETL_USING_CPP17
|
||||
|
||||
#include "unit_test_framework.h"
|
||||
|
||||
#include <string>
|
||||
@ -1586,3 +1589,5 @@ namespace
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@ -66,12 +66,12 @@ namespace
|
||||
{
|
||||
static const size_t SIZE = 11;
|
||||
|
||||
typedef etl::wstring<SIZE> Text;
|
||||
typedef etl::iwstring IText;
|
||||
typedef std::wstring Compare_Text;
|
||||
typedef Text::value_type value_t;
|
||||
typedef etl::wstring<52> TextL;
|
||||
typedef etl::wstring<4> TextS;
|
||||
using Text = etl::wstring<SIZE>;
|
||||
using IText = etl::iwstring;
|
||||
using Compare_Text = std::wstring;
|
||||
using value_t = Text::value_type;
|
||||
using TextL = etl::wstring<52>;
|
||||
using TextS = etl::wstring<4>;
|
||||
|
||||
Compare_Text initial_text;
|
||||
Compare_Text less_text;
|
||||
@ -596,8 +596,8 @@ namespace
|
||||
{
|
||||
Text text(initial_text.c_str());
|
||||
const Text constText(initial_text.c_str());
|
||||
|
||||
CHECK_EQUAL(&text[0], text.begin());
|
||||
|
||||
CHECK_EQUAL(&text[0], text.begin());
|
||||
CHECK_EQUAL(&constText[0], constText.begin());
|
||||
}
|
||||
|
||||
@ -607,7 +607,7 @@ namespace
|
||||
Text text(initial_text.c_str());
|
||||
const Text constText(initial_text.c_str());
|
||||
|
||||
CHECK_EQUAL(&text[initial_text.size()], text.end());
|
||||
CHECK_EQUAL(&text[initial_text.size()], text.end());
|
||||
CHECK_EQUAL(&constText[initial_text.size()], constText.end());
|
||||
}
|
||||
|
||||
|
||||
@ -168,12 +168,12 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_default_constructor_use_array_buffer)
|
||||
{
|
||||
Text text(array_text, std::size(array_text));
|
||||
Text text(array_text, ETL_OR_STD::size(array_text));
|
||||
|
||||
CHECK_EQUAL(0U, text.size());
|
||||
CHECK(text.empty());
|
||||
CHECK_EQUAL(std::size(array_text) - 1, text.capacity());
|
||||
CHECK_EQUAL(std::size(array_text) - 1, text.max_size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(array_text) - 1, text.capacity());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(array_text) - 1, text.max_size());
|
||||
CHECK(text.begin() == text.end());
|
||||
#if ETL_HAS_STRING_TRUNCATION_CHECKS
|
||||
CHECK(!text.is_truncated());
|
||||
@ -183,12 +183,12 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_default_constructor_use_array_buffer_text)
|
||||
{
|
||||
Text text(array_text, array_text, std::size(array_text));
|
||||
Text text(array_text, array_text, ETL_OR_STD::size(array_text));
|
||||
|
||||
CHECK_EQUAL(text.size(), etl::strlen(array_text));
|
||||
CHECK(!text.empty());
|
||||
CHECK_EQUAL(std::size(array_text) - 1, text.capacity());
|
||||
CHECK_EQUAL(std::size(array_text) - 1, text.max_size());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(array_text) - 1, text.capacity());
|
||||
CHECK_EQUAL(ETL_OR_STD::size(array_text) - 1, text.max_size());
|
||||
CHECK(text.begin() != text.end());
|
||||
#if ETL_HAS_STRING_TRUNCATION_CHECKS
|
||||
CHECK(!text.is_truncated());
|
||||
@ -734,8 +734,8 @@ namespace
|
||||
|
||||
TextBuffer buffer2;
|
||||
const Text constText(initial_text.c_str(), buffer2.data(), buffer2.size());
|
||||
|
||||
CHECK_EQUAL(&text[0], text.begin());
|
||||
|
||||
CHECK_EQUAL(&text[0], text.begin());
|
||||
CHECK_EQUAL(&constText[0], constText.begin());
|
||||
}
|
||||
|
||||
@ -749,7 +749,7 @@ namespace
|
||||
TextBuffer buffer2;
|
||||
const Text constText(initial_text.c_str(), buffer2.data(), buffer2.size());
|
||||
|
||||
CHECK_EQUAL(&text[initial_text.size()], text.end());
|
||||
CHECK_EQUAL(&text[initial_text.size()], text.end());
|
||||
CHECK_EQUAL(&constText[initial_text.size()], constText.end());
|
||||
}
|
||||
|
||||
|
||||
@ -181,7 +181,7 @@ namespace
|
||||
|
||||
common.Clear();
|
||||
|
||||
s.add_task_list(taskList, std::size(taskList));
|
||||
s.add_task_list(taskList, ETL_OR_STD::size(taskList));
|
||||
|
||||
CHECK(task1.task_added);
|
||||
CHECK(task2.task_added);
|
||||
@ -204,7 +204,7 @@ namespace
|
||||
|
||||
s.set_idle_callback(common.idle_callback);
|
||||
s.set_watchdog_callback(common.watchdog_callback);
|
||||
s.add_task_list(taskList, std::size(taskList));
|
||||
s.add_task_list(taskList, ETL_OR_STD::size(taskList));
|
||||
s.start(); // If 'start' returns then the idle callback was successfully called.
|
||||
|
||||
WorkList_t expected = { "T3W1", "T2W1", "T1W1", "T3W2", "T2W2", "T1W2", "T3W3", "T2W3", "T1W3", "T2W4" };
|
||||
@ -229,7 +229,7 @@ namespace
|
||||
|
||||
s.set_idle_callback(common.idle_callback);
|
||||
s.set_watchdog_callback(common.watchdog_callback);
|
||||
s.add_task_list(taskList, std::size(taskList));
|
||||
s.add_task_list(taskList, ETL_OR_STD::size(taskList));
|
||||
s.start(); // If 'start' returns then the idle callback was successfully called.
|
||||
|
||||
WorkList_t expected = { "T3W1", "T3W2", "T2W1", "T2W2", "T2W3", "T2W4", "T1W1", "T1W2", "T1W3", "T3W3" };
|
||||
@ -254,7 +254,7 @@ namespace
|
||||
|
||||
s.set_idle_callback(common.idle_callback);
|
||||
s.set_watchdog_callback(common.watchdog_callback);
|
||||
s.add_task_list(taskList, std::size(taskList));
|
||||
s.add_task_list(taskList, ETL_OR_STD::size(taskList));
|
||||
s.start(); // If 'start' returns then the idle callback was successfully called.
|
||||
|
||||
WorkList_t expected = { "T3W1", "T3W2", "T2W1", "T2W2", "T3W3", "T2W3", "T2W4", "T1W1", "T1W2", "T1W3" };
|
||||
@ -279,7 +279,7 @@ namespace
|
||||
|
||||
s.set_idle_callback(common.idle_callback);
|
||||
s.set_watchdog_callback(common.watchdog_callback);
|
||||
s.add_task_list(taskList, std::size(taskList));
|
||||
s.add_task_list(taskList, ETL_OR_STD::size(taskList));
|
||||
s.start(); // If 'start' returns then the idle callback was successfully called.
|
||||
|
||||
WorkList_t expected = { "T2W1", "T2W2", "T1W1", "T3W1", "T2W3", "T3W2", "T1W2", "T3W3", "T2W4", "T1W3" };
|
||||
|
||||
@ -1190,7 +1190,7 @@ namespace
|
||||
TEST(test_iterator_value_types_bug_584)
|
||||
{
|
||||
using Map = etl::unordered_map<int, int, 1, 1>;
|
||||
CHECK((!std::is_same_v<typename Map::const_iterator::value_type, typename Map::iterator::value_type>));
|
||||
CHECK((!std::is_same<typename Map::const_iterator::value_type, typename Map::iterator::value_type>::value));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -1026,7 +1026,7 @@ namespace
|
||||
TEST(test_iterator_value_types_bug_584)
|
||||
{
|
||||
using Map = etl::unordered_multimap<int, int, 1, 1>;
|
||||
CHECK((!std::is_same_v<typename Map::const_iterator::value_type, typename Map::iterator::value_type>));
|
||||
CHECK((!std::is_same<typename Map::const_iterator::value_type, typename Map::iterator::value_type>::value));
|
||||
}
|
||||
|
||||
TEST(test_parameterized_eq)
|
||||
|
||||
@ -902,7 +902,7 @@ namespace
|
||||
TEST(test_iterator_value_types_bug_584)
|
||||
{
|
||||
using Set = etl::unordered_multiset<int, 1, 1>;
|
||||
CHECK((!std::is_same_v<typename Set::const_iterator::value_type, typename Set::iterator::value_type>));
|
||||
CHECK((!std::is_same<typename Set::const_iterator::value_type, typename Set::iterator::value_type>::value));
|
||||
}
|
||||
|
||||
TEST(test_parameterized_eq)
|
||||
|
||||
@ -861,7 +861,7 @@ namespace
|
||||
TEST(test_iterator_value_types_bug_584)
|
||||
{
|
||||
using Set = etl::unordered_set<int, 1, 1>;
|
||||
CHECK((!std::is_same_v<typename Set::const_iterator::value_type, typename Set::iterator::value_type>));
|
||||
CHECK((!std::is_same<typename Set::const_iterator::value_type, typename Set::iterator::value_type>::value));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -101,6 +101,7 @@ namespace
|
||||
CHECK_EQUAL(2.3, p1.second);
|
||||
}
|
||||
|
||||
#if ETL_USING_CPP17
|
||||
//*************************************************************************
|
||||
TEST(test_cpp17_deduced_pair_construct)
|
||||
{
|
||||
@ -112,6 +113,7 @@ namespace
|
||||
CHECK_EQUAL(1, p1.first);
|
||||
CHECK_EQUAL(2.3, p1.second);
|
||||
}
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_pair_move_parameter_construct)
|
||||
@ -411,7 +413,7 @@ namespace
|
||||
//*************************************************************************
|
||||
TEST(test_functor)
|
||||
{
|
||||
constexpr etl::functor fw1(TestGlobal);
|
||||
constexpr etl::functor<int, int> fw1(TestGlobal);
|
||||
CHECK_EQUAL(2, fw1(1));
|
||||
}
|
||||
|
||||
|
||||
@ -32,14 +32,14 @@ SOFTWARE.
|
||||
#include "etl/visitor.h"
|
||||
#include "etl/overload.h"
|
||||
|
||||
#if ETL_USING_CPP17
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <variant>
|
||||
#include <type_traits>
|
||||
|
||||
#if ETL_USING_CPP17
|
||||
#include <variant>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
@ -1380,7 +1380,7 @@ namespace
|
||||
auto data = etl::make_vector<char>(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
|
||||
using Type = std::remove_reference_t<decltype(data[0])>;
|
||||
CHECK((std::is_same_v<int, Type>));
|
||||
CHECK((std::is_same<int, Type>::value));
|
||||
|
||||
CHECK_EQUAL(0, data[0]);
|
||||
CHECK_EQUAL(1, data[1]);
|
||||
|
||||
@ -33,6 +33,8 @@ SOFTWARE.
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "etl/vector.h"
|
||||
|
||||
namespace
|
||||
@ -200,6 +202,7 @@ namespace
|
||||
CHECK(is_equal);
|
||||
}
|
||||
|
||||
#include "etl/private/diagnostic_array_bounds_push.h"
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_constructor_size_excess)
|
||||
{
|
||||
@ -211,6 +214,7 @@ namespace
|
||||
{
|
||||
CHECK_THROW(CData data(SIZE + 1, buffer1, SIZE), etl::vector_full);
|
||||
}
|
||||
#include "etl/private/diagnostic_pop.h"
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_constructor_range)
|
||||
@ -518,6 +522,7 @@ namespace
|
||||
CHECK(is_equal);
|
||||
}
|
||||
|
||||
#include "etl/private/diagnostic_array_bounds_push.h"
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_resize_excess)
|
||||
{
|
||||
@ -539,6 +544,7 @@ namespace
|
||||
|
||||
CHECK_THROW(data.resize(NEW_SIZE), etl::vector_full);
|
||||
}
|
||||
#include "etl/private/diagnostic_pop.h"
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_resize_down)
|
||||
@ -916,6 +922,7 @@ namespace
|
||||
CHECK(is_equal);
|
||||
}
|
||||
|
||||
#include "etl/private/diagnostic_array_bounds_push.h"
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assign_size_value_excess)
|
||||
{
|
||||
@ -943,6 +950,7 @@ namespace
|
||||
|
||||
CHECK_THROW(data.assign(EXCESS_SIZE, &INITIAL_VALUE), etl::vector_full);
|
||||
}
|
||||
#include "etl/private/diagnostic_pop.h"
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_push_back)
|
||||
@ -990,6 +998,7 @@ namespace
|
||||
CHECK(is_equal);
|
||||
}
|
||||
|
||||
#include "etl/private/diagnostic_array_bounds_push.h"
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_push_back_excess)
|
||||
{
|
||||
@ -1019,6 +1028,7 @@ namespace
|
||||
|
||||
CHECK_THROW(data.push_back(&d), etl::vector_full);
|
||||
}
|
||||
#include "etl/private/diagnostic_pop.h"
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_emplace_back)
|
||||
@ -1258,6 +1268,7 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
#include "etl/private/diagnostic_array_bounds_push.h"
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_insert_position_n_value_excess)
|
||||
{
|
||||
@ -1309,6 +1320,7 @@ namespace
|
||||
|
||||
CHECK_THROW(data.insert(data.begin() + offset, INSERT_SIZE, &INITIAL_VALUE), etl::vector_full);
|
||||
}
|
||||
#include "etl/private/diagnostic_pop.h"
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_insert_position_range)
|
||||
@ -1356,6 +1368,7 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
#include "etl/private/diagnostic_array_bounds_push.h"
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_insert_position_range_excess)
|
||||
{
|
||||
@ -1405,6 +1418,7 @@ namespace
|
||||
|
||||
CHECK_THROW(data.insert(data.begin() + offset, initial_data.begin(), initial_data.end()), etl::vector_full);
|
||||
}
|
||||
#include "etl/private/diagnostic_pop.h"
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_erase_single)
|
||||
|
||||
@ -7,38 +7,42 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "etl", "etl.vcxproj", "{C21D
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug Intel - No STL|Win32 = Debug Intel - No STL|Win32
|
||||
Debug Intel - No STL|x64 = Debug Intel - No STL|x64
|
||||
Debug Intel|Win32 = Debug Intel|Win32
|
||||
Debug Intel|x64 = Debug Intel|x64
|
||||
Debug LLVM - No STL - Force Built-ins|Win32 = Debug LLVM - No STL - Force Built-ins|Win32
|
||||
Debug LLVM - No STL - Force Built-ins|x64 = Debug LLVM - No STL - Force Built-ins|x64
|
||||
Debug LLVM - No STL|Win32 = Debug LLVM - No STL|Win32
|
||||
Debug LLVM - No STL|x64 = Debug LLVM - No STL|x64
|
||||
Debug LLVM|Win32 = Debug LLVM|Win32
|
||||
Debug LLVM|x64 = Debug LLVM|x64
|
||||
Debug MSVC - Force C++03|Win32 = Debug MSVC - Force C++03|Win32
|
||||
Debug MSVC - Force C++03|x64 = Debug MSVC - Force C++03|x64
|
||||
Debug MSVC - No STL - Auto Built-ins|Win32 = Debug MSVC - No STL - Auto Built-ins|Win32
|
||||
Debug MSVC - No STL - Auto Built-ins|x64 = Debug MSVC - No STL - Auto Built-ins|x64
|
||||
Debug MSVC - No STL - Force Built-ins|Win32 = Debug MSVC - No STL - Force Built-ins|Win32
|
||||
Debug MSVC - No STL - Force Built-ins|x64 = Debug MSVC - No STL - Force Built-ins|x64
|
||||
Debug MSVC - No STL|Win32 = Debug MSVC - No STL|Win32
|
||||
Debug MSVC - No STL|x64 = Debug MSVC - No STL|x64
|
||||
Debug MSVC - No Tests|Win32 = Debug MSVC - No Tests|Win32
|
||||
Debug MSVC - No Tests|x64 = Debug MSVC - No Tests|x64
|
||||
Debug MSVC - Small Strings|Win32 = Debug MSVC - Small Strings|Win32
|
||||
Debug MSVC - Small Strings|x64 = Debug MSVC - Small Strings|x64
|
||||
Debug MSVC - String Truncation Is Error|Win32 = Debug MSVC - String Truncation Is Error|Win32
|
||||
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|x64 = Debug MSVC 64|x64
|
||||
Debug Intel C++17 - No STL|Win32 = Debug Intel C++17 - No STL|Win32
|
||||
Debug Intel C++17 - No STL|x64 = Debug Intel C++17 - No STL|x64
|
||||
Debug Intel C++17|Win32 = Debug Intel C++17|Win32
|
||||
Debug Intel C++17|x64 = Debug Intel C++17|x64
|
||||
Debug LLVM C++17 - No STL - Force Built-ins|Win32 = Debug LLVM C++17 - No STL - Force Built-ins|Win32
|
||||
Debug LLVM C++17 - No STL - Force Built-ins|x64 = Debug LLVM C++17 - No STL - Force Built-ins|x64
|
||||
Debug LLVM C++17 - No STL|Win32 = Debug LLVM C++17 - No STL|Win32
|
||||
Debug LLVM C++17 - No STL|x64 = Debug LLVM C++17 - No STL|x64
|
||||
Debug LLVM C++17|Win32 = Debug LLVM C++17|Win32
|
||||
Debug LLVM C++17|x64 = Debug LLVM C++17|x64
|
||||
Debug MSVC C++14 - No STL|Win32 = Debug MSVC C++14 - No STL|Win32
|
||||
Debug MSVC C++14 - No STL|x64 = Debug MSVC C++14 - No STL|x64
|
||||
Debug MSVC C++14|Win32 = Debug MSVC C++14|Win32
|
||||
Debug MSVC C++14|x64 = Debug MSVC C++14|x64
|
||||
Debug MSVC C++17 - 64|Win32 = Debug MSVC C++17 - 64|Win32
|
||||
Debug MSVC C++17 - 64|x64 = Debug MSVC C++17 - 64|x64
|
||||
Debug MSVC C++17 - Force C++03|Win32 = Debug MSVC C++17 - Force C++03|Win32
|
||||
Debug MSVC C++17 - Force C++03|x64 = Debug MSVC C++17 - Force C++03|x64
|
||||
Debug MSVC C++17 - No STL - Auto Built-ins|Win32 = Debug MSVC C++17 - No STL - Auto Built-ins|Win32
|
||||
Debug MSVC C++17 - No STL - Auto Built-ins|x64 = Debug MSVC C++17 - No STL - Auto Built-ins|x64
|
||||
Debug MSVC C++17 - No STL - Force Built-ins|Win32 = Debug MSVC C++17 - No STL - Force Built-ins|Win32
|
||||
Debug MSVC C++17 - No STL - Force Built-ins|x64 = Debug MSVC C++17 - No STL - Force Built-ins|x64
|
||||
Debug MSVC C++17 - No STL|Win32 = Debug MSVC C++17 - No STL|Win32
|
||||
Debug MSVC C++17 - No STL|x64 = Debug MSVC C++17 - No STL|x64
|
||||
Debug MSVC C++17 - No Tests|Win32 = Debug MSVC C++17 - No Tests|Win32
|
||||
Debug MSVC C++17 - No Tests|x64 = Debug MSVC C++17 - No Tests|x64
|
||||
Debug MSVC C++17 - Small Strings|Win32 = Debug MSVC C++17 - Small Strings|Win32
|
||||
Debug MSVC C++17 - Small Strings|x64 = Debug MSVC C++17 - Small Strings|x64
|
||||
Debug MSVC C++17 - String Truncation Is Error|Win32 = Debug MSVC C++17 - String Truncation Is Error|Win32
|
||||
Debug MSVC C++17 - String Truncation Is Error|x64 = Debug MSVC C++17 - String Truncation Is Error|x64
|
||||
Debug MSVC C++17|Win32 = Debug MSVC C++17|Win32
|
||||
Debug MSVC C++17|x64 = Debug MSVC C++17|x64
|
||||
Debug MSVC C++20 - No STL|Win32 = Debug MSVC C++20 - No STL|Win32
|
||||
Debug MSVC C++20 - No STL|x64 = Debug MSVC C++20 - No STL|x64
|
||||
Debug MSVC C++20|Win32 = Debug MSVC C++20|Win32
|
||||
Debug MSVC C++20|x64 = Debug MSVC C++20|x64
|
||||
Debug MSVC|Win32 = Debug MSVC|Win32
|
||||
Debug MSVC|x64 = Debug MSVC|x64
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
MSVC Debug Appveyor|Win32 = MSVC Debug Appveyor|Win32
|
||||
@ -49,58 +53,70 @@ Global
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Intel - No STL|Win32.ActiveCfg = Debug Intel - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Intel - No STL|Win32.Build.0 = Debug Intel - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Intel - No STL|x64.ActiveCfg = Debug Intel - No STL|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Intel - No STL|x64.Build.0 = Debug Intel - No STL|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Intel|Win32.ActiveCfg = Debug Intel|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Intel|Win32.Build.0 = Debug Intel|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Intel|x64.ActiveCfg = Debug Intel|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Intel|x64.Build.0 = Debug Intel|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM - No STL - Force Built-ins|Win32.ActiveCfg = Debug|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM - No STL - Force Built-ins|Win32.Build.0 = Debug|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM - No STL - Force Built-ins|x64.ActiveCfg = Test2|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM - No STL - Force Built-ins|x64.Build.0 = Test2|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM - No STL|Win32.ActiveCfg = Debug LLVM - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM - No STL|Win32.Build.0 = Debug LLVM - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM - No STL|x64.ActiveCfg = DebugLLVMNoSTL|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM - No STL|x64.Build.0 = DebugLLVMNoSTL|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM|Win32.ActiveCfg = Debug LLVM|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM|Win32.Build.0 = Debug LLVM|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM|x64.ActiveCfg = Debug LLVM|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM|x64.Build.0 = Debug LLVM|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - Force C++03|Win32.ActiveCfg = Debug MSVC - Force C++03|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - Force C++03|Win32.Build.0 = Debug MSVC - Force C++03|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - Force C++03|x64.ActiveCfg = Debug MSVC - Force C++03|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - Force C++03|x64.Build.0 = Debug MSVC - Force C++03|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL - Auto Built-ins|Win32.ActiveCfg = Debug MSVC - No STL - Built-ins|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL - Auto Built-ins|Win32.Build.0 = Debug MSVC - No STL - Built-ins|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL - Auto Built-ins|x64.ActiveCfg = Test1|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL - Auto Built-ins|x64.Build.0 = Test1|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL - Force Built-ins|Win32.ActiveCfg = Debug MSVC - No STL - Force Built-ins|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL - Force Built-ins|Win32.Build.0 = Debug MSVC - No STL - Force Built-ins|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL - Force Built-ins|x64.ActiveCfg = Debug MSVC - No STL - Force Built-ins|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL - Force Built-ins|x64.Build.0 = Debug MSVC - No STL - Force Built-ins|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL|Win32.ActiveCfg = Debug - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL|Win32.Build.0 = Debug - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL|x64.ActiveCfg = DebugNoSTL|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL|x64.Build.0 = DebugNoSTL|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No Tests|Win32.ActiveCfg = Debug MSVC - No Tests|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No Tests|Win32.Build.0 = Debug MSVC - No Tests|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No Tests|x64.ActiveCfg = Debug MSVC - No Tests|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No Tests|x64.Build.0 = Debug MSVC - No Tests|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - Small Strings|Win32.ActiveCfg = DebugMSVCSmallStrings|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - Small Strings|Win32.Build.0 = DebugMSVCSmallStrings|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - Small Strings|x64.ActiveCfg = DebugMSVCSmallStrings|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - Small Strings|x64.Build.0 = DebugMSVCSmallStrings|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - String Truncation Is Error|Win32.ActiveCfg = Debug|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - String Truncation Is Error|Win32.Build.0 = Debug|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - String Truncation Is Error|x64.ActiveCfg = DebugStringTruncationIsError|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - String Truncation Is Error|x64.Build.0 = DebugStringTruncationIsError|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC 64|Win32.ActiveCfg = Debug|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC 64|Win32.Build.0 = Debug|Win32
|
||||
{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 Intel C++17 - No STL|Win32.ActiveCfg = Debug Intel - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Intel C++17 - No STL|Win32.Build.0 = Debug Intel - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Intel C++17 - No STL|x64.ActiveCfg = Debug Intel - No STL|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Intel C++17 - No STL|x64.Build.0 = Debug Intel - No STL|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Intel C++17|Win32.ActiveCfg = Debug Intel|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Intel C++17|Win32.Build.0 = Debug Intel|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Intel C++17|x64.ActiveCfg = Debug Intel|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Intel C++17|x64.Build.0 = Debug Intel|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM C++17 - No STL - Force Built-ins|Win32.ActiveCfg = Debug|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM C++17 - No STL - Force Built-ins|Win32.Build.0 = Debug|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM C++17 - No STL - Force Built-ins|x64.ActiveCfg = Test2|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM C++17 - No STL - Force Built-ins|x64.Build.0 = Test2|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM C++17 - No STL|Win32.ActiveCfg = Debug LLVM - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM C++17 - No STL|Win32.Build.0 = Debug LLVM - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM C++17 - No STL|x64.ActiveCfg = DebugLLVMNoSTL|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM C++17 - No STL|x64.Build.0 = DebugLLVMNoSTL|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM C++17|Win32.ActiveCfg = Debug LLVM|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM C++17|Win32.Build.0 = Debug LLVM|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM C++17|x64.ActiveCfg = Debug LLVM|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM C++17|x64.Build.0 = Debug LLVM|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++14 - No STL|Win32.ActiveCfg = Debug MSVC C++14 - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++14 - No STL|Win32.Build.0 = Debug MSVC C++14 - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++14 - No STL|x64.ActiveCfg = Debug MSVC C++14 - No STL|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++14 - No STL|x64.Build.0 = Debug MSVC C++14 - No STL|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++14|Win32.ActiveCfg = Debug MSVC C++14|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++14|Win32.Build.0 = Debug MSVC C++14|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++14|x64.ActiveCfg = Debug MSVC C++14|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++14|x64.Build.0 = Debug MSVC C++14|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - 64|Win32.ActiveCfg = Debug|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - 64|Win32.Build.0 = Debug|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - 64|x64.ActiveCfg = Debug64|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - 64|x64.Build.0 = Debug64|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - Force C++03|Win32.ActiveCfg = Debug MSVC - Force C++03|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - Force C++03|Win32.Build.0 = Debug MSVC - Force C++03|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - Force C++03|x64.ActiveCfg = Debug MSVC - Force C++03|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - Force C++03|x64.Build.0 = Debug MSVC - Force C++03|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - No STL - Auto Built-ins|Win32.ActiveCfg = Debug MSVC - No STL - Built-ins|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - No STL - Auto Built-ins|Win32.Build.0 = Debug MSVC - No STL - Built-ins|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - No STL - Auto Built-ins|x64.ActiveCfg = Test1|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - No STL - Auto Built-ins|x64.Build.0 = Test1|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - No STL - Force Built-ins|Win32.ActiveCfg = Debug MSVC - No STL - Force Built-ins|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - No STL - Force Built-ins|Win32.Build.0 = Debug MSVC - No STL - Force Built-ins|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - No STL - Force Built-ins|x64.ActiveCfg = Debug MSVC - No STL - Force Built-ins|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - No STL - Force Built-ins|x64.Build.0 = Debug MSVC - No STL - Force Built-ins|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - No STL|Win32.ActiveCfg = Debug - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - No STL|Win32.Build.0 = Debug - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - No STL|x64.ActiveCfg = DebugNoSTL|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - No STL|x64.Build.0 = DebugNoSTL|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - No Tests|Win32.ActiveCfg = Debug MSVC - No Tests|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - No Tests|Win32.Build.0 = Debug MSVC - No Tests|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - No Tests|x64.ActiveCfg = Debug MSVC - No Tests|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - No Tests|x64.Build.0 = Debug MSVC - No Tests|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - Small Strings|Win32.ActiveCfg = DebugMSVCSmallStrings|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - Small Strings|Win32.Build.0 = DebugMSVCSmallStrings|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - Small Strings|x64.ActiveCfg = DebugMSVCSmallStrings|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - Small Strings|x64.Build.0 = DebugMSVCSmallStrings|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - String Truncation Is Error|Win32.ActiveCfg = Debug|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - String Truncation Is Error|Win32.Build.0 = Debug|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - String Truncation Is Error|x64.ActiveCfg = DebugStringTruncationIsError|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17 - String Truncation Is Error|x64.Build.0 = DebugStringTruncationIsError|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17|Win32.ActiveCfg = Debug|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17|Win32.Build.0 = Debug|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17|x64.ActiveCfg = Debug|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++17|x64.Build.0 = Debug|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++20 - No STL|Win32.ActiveCfg = Debug MSVC C++20 - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++20 - No STL|Win32.Build.0 = Debug MSVC C++20 - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++20 - No STL|x64.ActiveCfg = Debug MSVC C++20 - No STL|x64
|
||||
@ -109,10 +125,6 @@ Global
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++20|Win32.Build.0 = Debug MSVC C++20|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++20|x64.ActiveCfg = Debug MSVC C++20|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++20|x64.Build.0 = Debug MSVC C++20|x64
|
||||
{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|x64.ActiveCfg = Debug|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC|x64.Build.0 = Debug|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug|x64.ActiveCfg = Debug|x64
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -2213,9 +2213,6 @@
|
||||
<ClCompile Include="..\test_compare.cpp">
|
||||
<Filter>Tests\Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\test_compiler_settings.cpp">
|
||||
<Filter>Tests\Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\test_flags.cpp">
|
||||
<Filter>Tests\Misc</Filter>
|
||||
</ClCompile>
|
||||
@ -3526,9 +3523,12 @@
|
||||
<None Include="..\runtests-02.sh">
|
||||
<Filter>Tests\Scripts</Filter>
|
||||
</None>
|
||||
<None Include="..\..\.github\workflows\visual-studio.yml">
|
||||
<None Include="..\..\.github\workflows\msvc.yml">
|
||||
<Filter>Resource Files\CI\Github</Filter>
|
||||
</None>
|
||||
<None Include="..\runtests-c++14.sh">
|
||||
<Filter>Tests\Scripts</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\..\support\Release notes.txt">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user