diff --git a/.gitignore b/.gitignore index d33fd50b..5c8a2e4c 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/include/etl/bip_buffer_spsc_atomic.h b/include/etl/bip_buffer_spsc_atomic.h index dad24114..6b67ae4b 100644 --- a/include/etl/bip_buffer_spsc_atomic.h +++ b/include/etl/bip_buffer_spsc_atomic.h @@ -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); } diff --git a/include/etl/bit_stream.h b/include/etl/bit_stream.h index 5135cab5..21d95d36 100644 --- a/include/etl/bit_stream.h +++ b/include/etl/bit_stream.h @@ -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(begin_)), - length_chars(etl::distance(reinterpret_cast(begin_), reinterpret_cast(end_))) + : pdata(reinterpret_cast(begin_)) + , length_chars(etl::distance(reinterpret_cast(begin_), reinterpret_cast(end_))) { restart(); } @@ -109,8 +82,8 @@ namespace etl /// Construct from begin and length. //*************************************************************************** bit_stream(void* begin_, size_t length_) - : pdata(reinterpret_cast(begin_)), - length_chars(length_) + : pdata(reinterpret_cast(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(nbits)); } } - else - { - ETL_ASSERT_FAIL(ETL_ERROR(etl::bit_stream_overflow)); - } return success; } @@ -1144,10 +1105,6 @@ namespace etl { result = read_unchecked(); } - else - { - ETL_ASSERT_FAIL(ETL_ERROR(etl::bit_stream_overflow)); - } return result; } @@ -1180,10 +1137,6 @@ namespace etl { result = read_unchecked(nbits); } - else - { - ETL_ASSERT_FAIL(ETL_ERROR(etl::bit_stream_overflow)); - } return result; } @@ -1266,10 +1219,6 @@ namespace etl step(static_cast(nbits)); } } - else - { - ETL_ASSERT_FAIL_AND_RETURN_VALUE(ETL_ERROR(etl::bit_stream_overflow), false); - } return success; } diff --git a/include/etl/callback_timer.h b/include/etl/callback_timer.h index 12acb1f0..7f16bffe 100644 --- a/include/etl/callback_timer.h +++ b/include/etl/callback_timer.h @@ -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: diff --git a/include/etl/callback_timer_atomic.h b/include/etl/callback_timer_atomic.h index 650d8ae3..860901dd 100644 --- a/include/etl/callback_timer_atomic.h +++ b/include/etl/callback_timer_atomic.h @@ -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: diff --git a/include/etl/callback_timer_interrupt.h b/include/etl/callback_timer_interrupt.h index 02ebd933..11658707 100644 --- a/include/etl/callback_timer_interrupt.h +++ b/include/etl/callback_timer_interrupt.h @@ -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: diff --git a/include/etl/callback_timer_locked.h b/include/etl/callback_timer_locked.h index ad6eacd9..ab4dfa0e 100644 --- a/include/etl/callback_timer_locked.h +++ b/include/etl/callback_timer_locked.h @@ -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. diff --git a/include/etl/char_traits.h b/include/etl/char_traits.h index 8f4261a6..de34230f 100644 --- a/include/etl/char_traits.h +++ b/include/etl/char_traits.h @@ -58,11 +58,11 @@ namespace etl template<> struct char_traits_types { - 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 diff --git a/include/etl/error_handler.h b/include/etl/error_handler.h index a904fd77..13897057 100644 --- a/include/etl/error_handler.h +++ b/include/etl/error_handler.h @@ -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. diff --git a/include/etl/generators/message_packet_generator.h b/include/etl/generators/message_packet_generator.h index d300c7fe..6ada9acd 100644 --- a/include/etl/generators/message_packet_generator.h +++ b/include/etl/generators/message_packet_generator.h @@ -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::type, etl::message_packet<") + cog.out(" static const bool Enabled = (!etl::is_same::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::type, etl::imessage>::value &&") - cog.out(" etl::is_one_of::type,") + cog.outl(" !etl::is_same::type, etl::imessage>::value &&") + cog.out(" etl::is_one_of::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::type, etl::message_packet<") + cog.out(" static constexpr bool Enabled = (!etl::is_same::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::type, etl::imessage>::value &&") - cog.out(" etl::is_one_of::type,") + cog.outl(" !etl::is_same::type, etl::imessage>::value &&") + cog.out(" etl::is_one_of::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 ::type, etl::message_packet<") + cog.out(" template ::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::type, etl::imessage>::value &&") - cog.out(" !etl::is_one_of::type, ") + cog.outl(" !etl::is_same::type, etl::imessage>::value &&") + cog.out(" !etl::is_one_of::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 ") - cog.out(" explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet<") + cog.out(" explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::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::type, etl::imessage>::value &&") - cog.out(" !etl::is_one_of::type, ") + cog.outl(" !etl::is_same::type, etl::imessage>::value &&") + cog.out(" !etl::is_one_of::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 ::type, etl::message_packet<") + cog.out(" template ::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::type, etl::imessage>::value &&") - cog.out(" !etl::is_one_of::type, ") + cog.outl(" !etl::is_same::type, etl::imessage>::value &&") + cog.out(" !etl::is_one_of::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 ") - cog.out(" explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet<") + cog.out(" explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::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::type, etl::imessage>::value &&") - cog.out(" !etl::is_one_of::type, ") + cog.outl(" !etl::is_same::type, etl::imessage>::value &&") + cog.out(" !etl::is_one_of::type, ") for t in range(1, n): cog.out("T%s, " % t) cog.outl("T%s>::value, int>::type = 0)" % n) diff --git a/include/etl/generators/message_router_generator.h b/include/etl/generators/message_router_generator.h index 1bfe767a..50c7f5a9 100644 --- a/include/etl/generators/message_router_generator.h +++ b/include/etl/generators/message_router_generator.h @@ -620,28 +620,29 @@ namespace etl cog.outl(" }") cog.outl("") cog.outl(" template ") - cog.outl(" void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0)") - cog.outl(" {") - cog.out(" if ETL_IF_CONSTEXPR (etl::is_one_of::value && etl::is_one_of::value)" % int(Handlers)) - cog.outl(" {") - cog.outl(" static_cast(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(this)->on_receive(msg);") + cog.outl(" }") + cog.outl("") + cog.outl(" template ") + cog.out(" typename etl::enable_if::value && !etl::is_one_of::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(this)->on_receive_unknown(msg);") - cog.outl(" }") + cog.outl(" static_cast(this)->on_receive_unknown(msg);") cog.outl(" }") cog.outl(" }") cog.outl("") @@ -787,31 +788,33 @@ namespace etl cog.outl(" }") cog.outl("") cog.outl(" template ") - cog.outl(" void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0)") - cog.outl(" {") - cog.out(" if ETL_IF_CONSTEXPR (etl::is_one_of::value && etl::is_one_of::value)" % n) + cog.outl("T%s>::value, void>::type" % n) + cog.outl(" receive(const TMessage& msg)") + cog.outl(" {") + cog.outl(" static_cast(this)->on_receive(msg);") + cog.outl(" }") + cog.outl("") + cog.outl(" template ") + cog.out(" typename etl::enable_if::value && !etl::is_one_of::value, void>::type" % n) + cog.outl(" receive(const TMessage& msg)") + cog.outl(" {") + cog.outl(" if (has_successor())") cog.outl(" {") - cog.outl(" static_cast(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(this)->on_receive_unknown(msg);") - cog.outl(" }") + cog.outl(" static_cast(this)->on_receive_unknown(msg);") cog.outl(" }") cog.outl(" }") cog.outl("") + cog.outl("") cog.outl(" //**********************************************") cog.outl(" using imessage_router::accepts;") cog.outl("") diff --git a/include/etl/instance_count.h b/include/etl/instance_count.h index 608ec3c9..da66edb5 100644 --- a/include/etl/instance_count.h +++ b/include/etl/instance_count.h @@ -107,7 +107,7 @@ namespace etl //************************************************************************* static counter_type& current_instance_count() { - static counter_type counter = 0; + static counter_type counter = { 0 }; return counter; } }; diff --git a/include/etl/message_packet.h b/include/etl/message_packet.h index 248e2daa..cf5e4442 100644 --- a/include/etl/message_packet.h +++ b/include/etl/message_packet.h @@ -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 ::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value, int>::type> + template ::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::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::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 - explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::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::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::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::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 ::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::value, int>::type> + template ::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::value); + static constexpr bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 - explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::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::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::value); + static const bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 ::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::value, int>::type> + template ::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::value); + static constexpr bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 - explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::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::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::value); + static const bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 ::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::value, int>::type> + template ::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::value); + static constexpr bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 - explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::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::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::value); + static const bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 ::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::value, int>::type> + template ::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::value); + static constexpr bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 - explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::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::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::value); + static const bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 ::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::value, int>::type> + template ::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::value); + static constexpr bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 - explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::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::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::value); + static const bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 ::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::value, int>::type> + template ::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::value); + static constexpr bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 - explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::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::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::value); + static const bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 ::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8, T9>::value, int>::type> + template ::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7, T8, T9>::value); + static constexpr bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 - explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8, T9>::value, int>::type = 0) + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7, T8, T9>::value); + static const bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 ::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8>::value, int>::type> + template ::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7, T8>::value); + static constexpr bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 - explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8>::value, int>::type = 0) + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7, T8>::value); + static const bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 ::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7>::value, int>::type> + template ::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7>::value); + static constexpr bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 - explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7>::value, int>::type = 0) + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6, T7>::value); + static const bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 ::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4, T5, T6>::value, int>::type> + template ::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6>::value); + static constexpr bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 - explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4, T5, T6>::value, int>::type = 0) + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5, T6>::value); + static const bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 ::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4, T5>::value, int>::type> + template ::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5>::value); + static constexpr bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 - explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4, T5>::value, int>::type = 0) + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4, T5>::value); + static const bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 ::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4>::value, int>::type> + template ::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4>::value); + static constexpr bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 - explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3, T4>::value, int>::type = 0) + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3, T4>::value); + static const bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 ::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3>::value, int>::type> + template ::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3>::value); + static constexpr bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 - explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2, T3>::value, int>::type = 0) + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2, T3>::value); + static const bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 ::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2>::value, int>::type> + template ::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2>::value); + static constexpr bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 - explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1, T2>::value, int>::type = 0) + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1, T2>::value); + static const bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 ::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1>::value, int>::type> + template ::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1>::value); + static constexpr bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::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 - explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - !etl::is_one_of::type, T1>::value, int>::type = 0) + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + !etl::is_one_of::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::type, etl::message_packet >::value && - !etl::is_same::type, etl::imessage>::value && - etl::is_one_of::type,T1>::value); + static const bool Enabled = (!etl::is_same::type, etl::message_packet >::value && + !etl::is_same::type, etl::imessage>::value && + etl::is_one_of::type,T1>::value); ETL_STATIC_ASSERT(Enabled, "Message not in packet type list"); } diff --git a/include/etl/message_router.h b/include/etl/message_router.h index e5f9e12c..75172e72 100644 --- a/include/etl/message_router.h +++ b/include/etl/message_router.h @@ -607,25 +607,23 @@ namespace etl } template - void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0) + typename etl::enable_if::value && etl::is_one_of::value, void>::type + receive(const TMessage& msg) { - if ETL_IF_CONSTEXPR (etl::is_one_of::value) + static_cast(this)->on_receive(msg); + } + + template + typename etl::enable_if::value && !etl::is_one_of::value, void>::type + receive(const TMessage& msg) + { + if (has_successor()) { - static_cast(this)->on_receive(msg); + get_successor().receive(msg); } else { - if (has_successor()) - { - get_successor().receive(msg); - } - else - { - static_cast(this)->on_receive_unknown(msg); - } + static_cast(this)->on_receive_unknown(msg); } } @@ -753,28 +751,27 @@ namespace etl } template - void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0) + typename etl::enable_if::value && etl::is_one_of::value, void>::type + receive(const TMessage& msg) { - if ETL_IF_CONSTEXPR (etl::is_one_of::value) + static_cast(this)->on_receive(msg); + } + + template + typename etl::enable_if::value && !etl::is_one_of::value, void>::type + receive(const TMessage& msg) + { + if (has_successor()) { - static_cast(this)->on_receive(msg); + get_successor().receive(msg); } else { - if (has_successor()) - { - get_successor().receive(msg); - } - else - { - static_cast(this)->on_receive_unknown(msg); - } + static_cast(this)->on_receive_unknown(msg); } } + //********************************************** using imessage_router::accepts; @@ -898,28 +895,27 @@ namespace etl } template - void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0) + typename etl::enable_if::value && etl::is_one_of::value, void>::type + receive(const TMessage& msg) { - if ETL_IF_CONSTEXPR (etl::is_one_of::value) + static_cast(this)->on_receive(msg); + } + + template + typename etl::enable_if::value && !etl::is_one_of::value, void>::type + receive(const TMessage& msg) + { + if (has_successor()) { - static_cast(this)->on_receive(msg); + get_successor().receive(msg); } else { - if (has_successor()) - { - get_successor().receive(msg); - } - else - { - static_cast(this)->on_receive_unknown(msg); - } + static_cast(this)->on_receive_unknown(msg); } } + //********************************************** using imessage_router::accepts; @@ -1042,28 +1038,27 @@ namespace etl } template - void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0) + typename etl::enable_if::value && etl::is_one_of::value, void>::type + receive(const TMessage& msg) { - if ETL_IF_CONSTEXPR (etl::is_one_of::value) + static_cast(this)->on_receive(msg); + } + + template + typename etl::enable_if::value && !etl::is_one_of::value, void>::type + receive(const TMessage& msg) + { + if (has_successor()) { - static_cast(this)->on_receive(msg); + get_successor().receive(msg); } else { - if (has_successor()) - { - get_successor().receive(msg); - } - else - { - static_cast(this)->on_receive_unknown(msg); - } + static_cast(this)->on_receive_unknown(msg); } } + //********************************************** using imessage_router::accepts; @@ -1184,27 +1179,27 @@ namespace etl } template - void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0) + typename etl::enable_if::value && etl::is_one_of::value, void>::type + receive(const TMessage& msg) { - if ETL_IF_CONSTEXPR (etl::is_one_of::value) + static_cast(this)->on_receive(msg); + } + + template + typename etl::enable_if::value && !etl::is_one_of::value, void>::type + receive(const TMessage& msg) + { + if (has_successor()) { - static_cast(this)->on_receive(msg); + get_successor().receive(msg); } else { - if (has_successor()) - { - get_successor().receive(msg); - } - else - { - static_cast(this)->on_receive_unknown(msg); - } + static_cast(this)->on_receive_unknown(msg); } } + //********************************************** using imessage_router::accepts; @@ -1324,27 +1319,27 @@ namespace etl } template - void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0) + typename etl::enable_if::value && etl::is_one_of::value, void>::type + receive(const TMessage& msg) { - if ETL_IF_CONSTEXPR (etl::is_one_of::value) + static_cast(this)->on_receive(msg); + } + + template + typename etl::enable_if::value && !etl::is_one_of::value, void>::type + receive(const TMessage& msg) + { + if (has_successor()) { - static_cast(this)->on_receive(msg); + get_successor().receive(msg); } else { - if (has_successor()) - { - get_successor().receive(msg); - } - else - { - static_cast(this)->on_receive_unknown(msg); - } + static_cast(this)->on_receive_unknown(msg); } } + //********************************************** using imessage_router::accepts; @@ -1463,27 +1458,27 @@ namespace etl } template - void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0) + typename etl::enable_if::value && etl::is_one_of::value, void>::type + receive(const TMessage& msg) { - if ETL_IF_CONSTEXPR (etl::is_one_of::value) + static_cast(this)->on_receive(msg); + } + + template + typename etl::enable_if::value && !etl::is_one_of::value, void>::type + receive(const TMessage& msg) + { + if (has_successor()) { - static_cast(this)->on_receive(msg); + get_successor().receive(msg); } else { - if (has_successor()) - { - get_successor().receive(msg); - } - else - { - static_cast(this)->on_receive_unknown(msg); - } + static_cast(this)->on_receive_unknown(msg); } } + //********************************************** using imessage_router::accepts; @@ -1601,27 +1596,27 @@ namespace etl } template - void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0) + typename etl::enable_if::value && etl::is_one_of::value, void>::type + receive(const TMessage& msg) { - if ETL_IF_CONSTEXPR (etl::is_one_of::value) + static_cast(this)->on_receive(msg); + } + + template + typename etl::enable_if::value && !etl::is_one_of::value, void>::type + receive(const TMessage& msg) + { + if (has_successor()) { - static_cast(this)->on_receive(msg); + get_successor().receive(msg); } else { - if (has_successor()) - { - get_successor().receive(msg); - } - else - { - static_cast(this)->on_receive_unknown(msg); - } + static_cast(this)->on_receive_unknown(msg); } } + //********************************************** using imessage_router::accepts; @@ -1737,26 +1732,27 @@ namespace etl } template - void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0) + typename etl::enable_if::value && etl::is_one_of::value, void>::type + receive(const TMessage& msg) { - if ETL_IF_CONSTEXPR (etl::is_one_of::value) + static_cast(this)->on_receive(msg); + } + + template + typename etl::enable_if::value && !etl::is_one_of::value, void>::type + receive(const TMessage& msg) + { + if (has_successor()) { - static_cast(this)->on_receive(msg); + get_successor().receive(msg); } else { - if (has_successor()) - { - get_successor().receive(msg); - } - else - { - static_cast(this)->on_receive_unknown(msg); - } + static_cast(this)->on_receive_unknown(msg); } } + //********************************************** using imessage_router::accepts; @@ -1871,26 +1867,27 @@ namespace etl } template - void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0) + typename etl::enable_if::value && etl::is_one_of::value, void>::type + receive(const TMessage& msg) { - if ETL_IF_CONSTEXPR (etl::is_one_of::value) + static_cast(this)->on_receive(msg); + } + + template + typename etl::enable_if::value && !etl::is_one_of::value, void>::type + receive(const TMessage& msg) + { + if (has_successor()) { - static_cast(this)->on_receive(msg); + get_successor().receive(msg); } else { - if (has_successor()) - { - get_successor().receive(msg); - } - else - { - static_cast(this)->on_receive_unknown(msg); - } + static_cast(this)->on_receive_unknown(msg); } } + //********************************************** using imessage_router::accepts; @@ -2003,26 +2000,27 @@ namespace etl } template - void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0) + typename etl::enable_if::value && etl::is_one_of::value, void>::type + receive(const TMessage& msg) { - if ETL_IF_CONSTEXPR (etl::is_one_of::value) + static_cast(this)->on_receive(msg); + } + + template + typename etl::enable_if::value && !etl::is_one_of::value, void>::type + receive(const TMessage& msg) + { + if (has_successor()) { - static_cast(this)->on_receive(msg); + get_successor().receive(msg); } else { - if (has_successor()) - { - get_successor().receive(msg); - } - else - { - static_cast(this)->on_receive_unknown(msg); - } + static_cast(this)->on_receive_unknown(msg); } } + //********************************************** using imessage_router::accepts; @@ -2134,26 +2132,27 @@ namespace etl } template - void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0) + typename etl::enable_if::value && etl::is_one_of::value, void>::type + receive(const TMessage& msg) { - if ETL_IF_CONSTEXPR (etl::is_one_of::value) + static_cast(this)->on_receive(msg); + } + + template + typename etl::enable_if::value && !etl::is_one_of::value, void>::type + receive(const TMessage& msg) + { + if (has_successor()) { - static_cast(this)->on_receive(msg); + get_successor().receive(msg); } else { - if (has_successor()) - { - get_successor().receive(msg); - } - else - { - static_cast(this)->on_receive_unknown(msg); - } + static_cast(this)->on_receive_unknown(msg); } } + //********************************************** using imessage_router::accepts; @@ -2263,25 +2262,27 @@ namespace etl } template - void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0) + typename etl::enable_if::value && etl::is_one_of::value, void>::type + receive(const TMessage& msg) { - if ETL_IF_CONSTEXPR (etl::is_one_of::value) + static_cast(this)->on_receive(msg); + } + + template + typename etl::enable_if::value && !etl::is_one_of::value, void>::type + receive(const TMessage& msg) + { + if (has_successor()) { - static_cast(this)->on_receive(msg); + get_successor().receive(msg); } else { - if (has_successor()) - { - get_successor().receive(msg); - } - else - { - static_cast(this)->on_receive_unknown(msg); - } + static_cast(this)->on_receive_unknown(msg); } } + //********************************************** using imessage_router::accepts; @@ -2390,25 +2391,27 @@ namespace etl } template - void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0) + typename etl::enable_if::value && etl::is_one_of::value, void>::type + receive(const TMessage& msg) { - if ETL_IF_CONSTEXPR (etl::is_one_of::value) + static_cast(this)->on_receive(msg); + } + + template + typename etl::enable_if::value && !etl::is_one_of::value, void>::type + receive(const TMessage& msg) + { + if (has_successor()) { - static_cast(this)->on_receive(msg); + get_successor().receive(msg); } else { - if (has_successor()) - { - get_successor().receive(msg); - } - else - { - static_cast(this)->on_receive_unknown(msg); - } + static_cast(this)->on_receive_unknown(msg); } } + //********************************************** using imessage_router::accepts; @@ -2516,25 +2519,27 @@ namespace etl } template - void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0) + typename etl::enable_if::value && etl::is_one_of::value, void>::type + receive(const TMessage& msg) { - if ETL_IF_CONSTEXPR (etl::is_one_of::value) + static_cast(this)->on_receive(msg); + } + + template + typename etl::enable_if::value && !etl::is_one_of::value, void>::type + receive(const TMessage& msg) + { + if (has_successor()) { - static_cast(this)->on_receive(msg); + get_successor().receive(msg); } else { - if (has_successor()) - { - get_successor().receive(msg); - } - else - { - static_cast(this)->on_receive_unknown(msg); - } + static_cast(this)->on_receive_unknown(msg); } } + //********************************************** using imessage_router::accepts; @@ -2641,25 +2646,27 @@ namespace etl } template - void receive(const TMessage& msg, typename etl::enable_if::value, int>::type = 0) + typename etl::enable_if::value && etl::is_one_of::value, void>::type + receive(const TMessage& msg) { - if ETL_IF_CONSTEXPR (etl::is_one_of::value) + static_cast(this)->on_receive(msg); + } + + template + typename etl::enable_if::value && !etl::is_one_of::value, void>::type + receive(const TMessage& msg) + { + if (has_successor()) { - static_cast(this)->on_receive(msg); + get_successor().receive(msg); } else { - if (has_successor()) - { - get_successor().receive(msg); - } - else - { - static_cast(this)->on_receive_unknown(msg); - } + static_cast(this)->on_receive_unknown(msg); } } + //********************************************** using imessage_router::accepts; diff --git a/include/etl/message_timer.h b/include/etl/message_timer.h index 97d0bd76..4655f1ab 100644 --- a/include/etl/message_timer.h +++ b/include/etl/message_timer.h @@ -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: diff --git a/include/etl/message_timer_atomic.h b/include/etl/message_timer_atomic.h index e8ba0555..4f79904b 100644 --- a/include/etl/message_timer_atomic.h +++ b/include/etl/message_timer_atomic.h @@ -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: diff --git a/include/etl/message_timer_interrupt.h b/include/etl/message_timer_interrupt.h index 2390f3f2..e7a5a404 100644 --- a/include/etl/message_timer_interrupt.h +++ b/include/etl/message_timer_interrupt.h @@ -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: diff --git a/include/etl/message_timer_locked.h b/include/etl/message_timer_locked.h index 731df313..cd9f7e78 100644 --- a/include/etl/message_timer_locked.h +++ b/include/etl/message_timer_locked.h @@ -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. diff --git a/include/etl/observer.h b/include/etl/observer.h index ef0d12ee..c09180c0 100644 --- a/include/etl/observer.h +++ b/include/etl/observer.h @@ -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)); diff --git a/include/etl/optional.h b/include/etl/optional.h index ee563969..875cda7b 100644 --- a/include/etl/optional.h +++ b/include/etl/optional.h @@ -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 //*************************************************************************** diff --git a/include/etl/private/bitset_legacy.h b/include/etl/private/bitset_legacy.h index 53aa3829..775012b7 100644 --- a/include/etl/private/bitset_legacy.h +++ b/include/etl/private/bitset_legacy.h @@ -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& 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& 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& 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& 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) { diff --git a/include/etl/private/bitset_new.h b/include/etl/private/bitset_new.h index fc387cd7..d636ce60 100644 --- a/include/etl/private/bitset_new.h +++ b/include/etl/private/bitset_new.h @@ -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) { diff --git a/include/etl/private/pvoidvector.h b/include/etl/private/pvoidvector.h index 558b9584..0561082e 100644 --- a/include/etl/private/pvoidvector.h +++ b/include/etl/private/pvoidvector.h @@ -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(d) <= CAPACITY, ETL_ERROR(vector_full)); + ETL_ASSERT_OR_RETURN(static_cast(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(d) <= CAPACITY, ETL_ERROR(vector_full)); + ETL_ASSERT_OR_RETURN(static_cast(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_); diff --git a/include/etl/profiles/determine_compiler_language_support.h b/include/etl/profiles/determine_compiler_language_support.h index 23083e13..827bb713 100644 --- a/include/etl/profiles/determine_compiler_language_support.h +++ b/include/etl/profiles/determine_compiler_language_support.h @@ -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 diff --git a/include/etl/shared_message.h b/include/etl/shared_message.h index 00ec6d10..013ea887 100644 --- a/include/etl/shared_message.h +++ b/include/etl/shared_message.h @@ -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) { diff --git a/include/etl/vector.h b/include/etl/vector.h index dde676bb..bada15ba 100644 --- a/include/etl/vector.h +++ b/include/etl/vector.h @@ -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(d) <= CAPACITY, ETL_ERROR(vector_full)); + ETL_ASSERT_OR_RETURN(static_cast(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::value, ETL_ERROR(etl::vector_incompatible_type)); + ETL_ASSERT_OR_RETURN(etl::is_trivially_copyable::value, ETL_ERROR(etl::vector_incompatible_type)); etl::ivector::repair_buffer(buffer); } diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0cc34109..07a2e8d2 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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) \ No newline at end of file diff --git a/test/UnitTest++/CheckMacros.h b/test/UnitTest++/CheckMacros.h index 0ee75dfd..4cb5767c 100644 --- a/test/UnitTest++/CheckMacros.h +++ b/test/UnitTest++/CheckMacros.h @@ -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 diff --git a/test/UnitTest++/Checks.h b/test/UnitTest++/Checks.h index 0cf552df..72326a07 100644 --- a/test/UnitTest++/Checks.h +++ b/test/UnitTest++/Checks.h @@ -16,8 +16,146 @@ #include "MemoryOutStream.h" #include -namespace UnitTest { +namespace UnitTest +{ + template + typename std::enable_if::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::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::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::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::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::int_type; + + std::ostringstream oss; + + oss << type(c); + + return oss.str(); + } +#endif + + template + 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(c); + + return oss.str(); + } +#endif + + template <> + inline std::string DisplayValue(const wchar_t* c) + { + std::ostringstream oss; + + oss << static_cast(c); + + return oss.str(); + } + +#if (__cplusplus >= 201103L) + template <> + inline std::string DisplayValue(const char16_t* c) + { + std::ostringstream oss; + + oss << static_cast(c); + + return oss.str(); + } + + template <> + inline std::string DisplayValue(const char32_t* c) + { + std::ostringstream oss; + + oss << static_cast(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>> || - - std::is_same_v>> || std::is_same_v>> || - std::is_same_v>> || std::is_same_v>> || - std::is_same_v>> || std::is_same_v>>), 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>> || std::is_same_v>> || - std::is_same_v>> || std::is_same_v>> || - std::is_same_v>> || std::is_same_v>> || - std::is_same_v>> || std::is_same_v>>), void> - CheckEqual(TestResults& results, Expected const& expected, Actual const& actual, TestDetails const& details) - { - if (!(expected == actual)) - { - using int_type_expected = std::char_traits::int_type; - using int_type_actual = std::char_traits::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; - using actual_type = std::remove_cvref_t; - - if constexpr (std::is_same_v || std::is_same_v || - std::is_same_v || std::is_same_v || - std::is_same_v || std::is_same_v || - std::is_same_v || std::is_same_v) - { - using int_type_expected = std::char_traits::int_type; - using int_type_actual = std::char_traits::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) diff --git a/test/etl_error_handler/exceptions/CMakeLists.txt b/test/etl_error_handler/exceptions/CMakeLists.txt index 77962471..3eb91a71 100644 --- a/test/etl_error_handler/exceptions/CMakeLists.txt +++ b/test/etl_error_handler/exceptions/CMakeLists.txt @@ -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) - diff --git a/test/etl_error_handler/exceptions/test_error_handler.cpp b/test/etl_error_handler/exceptions/test_error_handler.cpp index fe83d0d3..44f46efa 100644 --- a/test/etl_error_handler/exceptions/test_error_handler.cpp +++ b/test/etl_error_handler/exceptions/test_error_handler.cpp @@ -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; diff --git a/test/etl_error_handler/log_errors/CMakeLists.txt b/test/etl_error_handler/log_errors/CMakeLists.txt index 296ffe58..cbea8e44 100644 --- a/test/etl_error_handler/log_errors/CMakeLists.txt +++ b/test/etl_error_handler/log_errors/CMakeLists.txt @@ -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") diff --git a/test/etl_error_handler/log_errors/test_error_handler.cpp b/test/etl_error_handler/log_errors/test_error_handler.cpp index b395dca7..ade19548 100644 --- a/test/etl_error_handler/log_errors/test_error_handler.cpp +++ b/test/etl_error_handler/log_errors/test_error_handler.cpp @@ -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; diff --git a/test/etl_error_handler/log_errors_and_exceptions/CMakeLists.txt b/test/etl_error_handler/log_errors_and_exceptions/CMakeLists.txt index 9112d519..6ef1fa64 100644 --- a/test/etl_error_handler/log_errors_and_exceptions/CMakeLists.txt +++ b/test/etl_error_handler/log_errors_and_exceptions/CMakeLists.txt @@ -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") diff --git a/test/etl_error_handler/log_errors_and_exceptions/test_error_handler.cpp b/test/etl_error_handler/log_errors_and_exceptions/test_error_handler.cpp index ce8a996b..97392a81 100644 --- a/test/etl_error_handler/log_errors_and_exceptions/test_error_handler.cpp +++ b/test/etl_error_handler/log_errors_and_exceptions/test_error_handler.cpp @@ -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; diff --git a/test/runtests-01.sh b/test/runtests-O1.sh similarity index 100% rename from test/runtests-01.sh rename to test/runtests-O1.sh diff --git a/test/runtests-02.sh b/test/runtests-O2.sh similarity index 100% rename from test/runtests-02.sh rename to test/runtests-O2.sh diff --git a/test/runtests-03.sh b/test/runtests-O3.sh similarity index 100% rename from test/runtests-03.sh rename to test/runtests-O3.sh diff --git a/test/runtests-c++14.sh b/test/runtests-c++14.sh new file mode 100644 index 00000000..4dea9034 --- /dev/null +++ b/test/runtests-c++14.sh @@ -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 diff --git a/test/runtests.sh b/test/runtests.sh index 6ad9f190..249a44b8 100644 --- a/test/runtests.sh +++ b/test/runtests.sh @@ -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 diff --git a/test/test_algorithm.cpp b/test/test_algorithm.cpp index 23fb819f..d68e6b48 100644 --- a/test/test_algorithm.cpp +++ b/test/test_algorithm.cpp @@ -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(), 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(), std::placeholders::_1, 2)); diff --git a/test/test_array.cpp b/test/test_array.cpp index fc8de4e2..1806af64 100644 --- a/test/test_array.cpp +++ b/test/test_array.cpp @@ -701,7 +701,7 @@ namespace auto data = etl::make_array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); using Type = std::remove_reference_t; - CHECK((std::is_same_v)); + CHECK((std::is_same::value)); CHECK_EQUAL(0, data[0]); CHECK_EQUAL(1, data[1]); @@ -723,7 +723,7 @@ namespace auto data = etl::make_array(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; - CHECK((std::is_same_v)); + CHECK((std::is_same::value)); CHECK_EQUAL(Moveable(0), data[0]); CHECK_EQUAL(Moveable(1), data[1]); diff --git a/test/test_bit_stream_reader_big_endian.cpp b/test/test_bit_stream_reader_big_endian.cpp index c8544eba..068f8371 100644 --- a/test/test_bit_stream_reader_big_endian.cpp +++ b/test/test_bit_stream_reader_big_endian.cpp @@ -147,7 +147,7 @@ namespace CHECK_EQUAL(false, result.value()); // One too many. - CHECK_THROW(bit_stream.read(), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read()); } //************************************************************************* @@ -202,7 +202,7 @@ namespace CHECK_EQUAL(false, result.value()); // One too many. - CHECK_THROW(etl::read(bit_stream), etl::bit_stream_overflow); + CHECK_FALSE(etl::read(bit_stream)); } //************************************************************************* @@ -238,7 +238,7 @@ namespace CHECK_EQUAL(int(expected[3]), int(result.value())); // One too many. - CHECK_THROW(bit_stream.read(), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read()); } //************************************************************************* @@ -274,7 +274,7 @@ namespace CHECK_EQUAL(int(expected[3]), int(result.value())); // One too many. - CHECK_THROW(etl::read(bit_stream), etl::bit_stream_overflow); + CHECK_FALSE(etl::read(bit_stream)); } //************************************************************************* @@ -305,7 +305,7 @@ namespace //************************************************************************* TEST(test_read_int8_t_5bits) { - std::array storage = { char(0x0E), char(0x8B), char(0xF0) }; + std::array storage = { char(0x0E), char(0x8B), char(0xF0) }; std::array 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(5U), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read(5U)); } //************************************************************************* TEST(test_read_int8_t_5bits_with_skip) { - std::array storage = { char(0x0E), char(0x8B), char(0xF0) }; + std::array storage = { char(0x0E), char(0x8B), char(0xF0) }; std::array 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(5U), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read(5U)); } //************************************************************************* TEST(test_read_checked_int8_t_5bits_using_non_member_function) { - std::array storage = { char(0x0E), char(0x8B), char(0xF0) }; + std::array storage = { char(0x0E), char(0x8B), char(0xF0) }; std::array 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(bit_stream, 5U), etl::bit_stream_overflow); + CHECK_FALSE(etl::read(bit_stream, 5U)); } //************************************************************************* TEST(test_read_unchecked_int8_t_5bits_using_non_member_function) { - std::array storage = { char(0x0E), char(0x8B), char(0xF0) }; + std::array storage = { char(0x0E), char(0x8B), char(0xF0) }; std::array 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(), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read()); } //************************************************************************* TEST(test_read_uint8_t_5bits) { - std::array storage = { char(0x0E), char(0x8B), char(0xF0) }; + std::array storage = { char(0x0E), char(0x8B), char(0xF0) }; std::array 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(5U), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read(5U)); } //************************************************************************* @@ -538,7 +538,7 @@ namespace CHECK_EQUAL(expected[3], result.value()); // One too many. - CHECK_THROW(bit_stream.read(), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read()); } //************************************************************************* @@ -574,7 +574,7 @@ namespace CHECK_EQUAL(expected[3], result.value()); // One too many. - CHECK_THROW(bit_stream.read(10U), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read(10U)); } //************************************************************************* @@ -610,7 +610,7 @@ namespace CHECK_EQUAL(expected[3], result.value()); // One too many. - CHECK_THROW(bit_stream.read(), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read()); } //************************************************************************* @@ -646,7 +646,7 @@ namespace CHECK_EQUAL(expected[3], result.value()); // One too many. - CHECK_THROW(bit_stream.read(10U), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read(10U)); } //************************************************************************* @@ -685,15 +685,15 @@ namespace CHECK_EQUAL(expected[3], result.value()); // One too many. - CHECK_THROW(bit_stream.read(), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read()); } //************************************************************************* TEST(test_read_int32_t_22bits) { - std::array 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 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 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(22U), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read(22U)); } //************************************************************************* @@ -762,15 +762,15 @@ namespace CHECK_EQUAL(expected[3], result.value()); // One too many. - CHECK_THROW(bit_stream.read(), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read()); } //************************************************************************* TEST(test_read_uint32_t_22bits) { - std::array 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 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 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(22U), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read(22U)); } //************************************************************************* @@ -839,7 +839,7 @@ namespace CHECK_EQUAL(expected[3], result.value()); // One too many. - CHECK_THROW(bit_stream.read(), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read()); } //************************************************************************* @@ -877,7 +877,7 @@ namespace CHECK_EQUAL(expected[3], result.value()); // One too many. - CHECK_THROW(bit_stream.read(47U), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read(47U)); } //************************************************************************* @@ -916,7 +916,7 @@ namespace CHECK_EQUAL(expected[3], result.value()); // One too many. - CHECK_THROW(bit_stream.read(), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read()); } //************************************************************************* @@ -954,7 +954,7 @@ namespace CHECK_EQUAL(expected[3], result.value()); // One too many. - CHECK_THROW(bit_stream.read(47U), etl::bit_stream_overflow); + CHECK_FALSE(bit_stream.read(47U)); } //************************************************************************* diff --git a/test/test_byte_stream.cpp b/test/test_byte_stream.cpp index 8bd55036..3f8e8296 100644 --- a/test/test_byte_stream.cpp +++ b/test/test_byte_stream.cpp @@ -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()); @@ -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 storage_span(storage, storage + std::size(storage)); + etl::span storage_span(storage, storage + ETL_OR_STD::size(storage)); etl::span 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 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. diff --git a/test/test_callback_timer_interrupt.cpp b/test/test_callback_timer_interrupt.cpp index f695239d..70fc6f72 100644 --- a/test/test_callback_timer_interrupt.cpp +++ b/test/test_callback_timer_interrupt.cpp @@ -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) { diff --git a/test/test_char_traits.cpp b/test/test_char_traits.cpp index 283e0f80..1963c767 100644 --- a/test/test_char_traits.cpp +++ b/test/test_char_traits.cpp @@ -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)); diff --git a/test/test_circular_iterator.cpp b/test/test_circular_iterator.cpp index 04983aba..2888d3a9 100644 --- a/test/test_circular_iterator.cpp +++ b/test/test_circular_iterator.cpp @@ -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; } } diff --git a/test/test_compiler_settings.cpp b/test/test_compiler_settings.cpp deleted file mode 100644 index 72e0a011..00000000 --- a/test/test_compiler_settings.cpp +++ /dev/null @@ -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); - } - }; -} diff --git a/test/test_container.cpp b/test/test_container.cpp index 8bfcccbd..bb28bb8c 100644 --- a/test/test_container.cpp +++ b/test/test_container.cpp @@ -129,7 +129,7 @@ namespace const size_t SIZE = 10UL; std::list 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)); diff --git a/test/test_expected.cpp b/test/test_expected.cpp index b5a44db4..b97346e5 100644 --- a/test/test_expected.cpp +++ b/test/test_expected.cpp @@ -32,7 +32,6 @@ SOFTWARE. #include "etl/type_traits.h" #include -#include namespace { diff --git a/test/test_flat_map.cpp b/test/test_flat_map.cpp index 3b1e0c2c..6550f274 100644 --- a/test/test_flat_map.cpp +++ b/test/test_flat_map.cpp @@ -1525,7 +1525,7 @@ namespace auto v = *data.begin(); using Type = decltype(v); - CHECK((std::is_same_v)); + CHECK((std::is_same::value)); CHECK_EQUAL(NDC("A"), data.at(0)); CHECK_EQUAL(NDC("B"), data.at(1)); diff --git a/test/test_flat_multimap.cpp b/test/test_flat_multimap.cpp index c9fa25de..9be71afb 100644 --- a/test/test_flat_multimap.cpp +++ b/test/test_flat_multimap.cpp @@ -1326,7 +1326,7 @@ namespace auto v = *data.begin(); using Type = decltype(v); - CHECK((std::is_same_v)); + CHECK((std::is_same::value)); decltype(data)::const_iterator itr = data.begin(); diff --git a/test/test_flat_multiset.cpp b/test/test_flat_multiset.cpp index e6e57c92..fbeba5c1 100644 --- a/test/test_flat_multiset.cpp +++ b/test/test_flat_multiset.cpp @@ -1273,7 +1273,7 @@ namespace auto v = *data.begin(); using Type = decltype(v); - CHECK((std::is_same_v)); + CHECK((std::is_same::value)); decltype(data)::const_iterator itr = data.begin(); diff --git a/test/test_flat_set.cpp b/test/test_flat_set.cpp index 14718176..931972e2 100644 --- a/test/test_flat_set.cpp +++ b/test/test_flat_set.cpp @@ -1196,7 +1196,7 @@ namespace auto v = *data.begin(); using Type = decltype(v); - CHECK((std::is_same_v)); + CHECK((std::is_same::value)); decltype(data)::const_iterator itr = data.begin(); diff --git a/test/test_forward_list.cpp b/test/test_forward_list.cpp index 43c85bde..8d9f85a3 100644 --- a/test/test_forward_list.cpp +++ b/test/test_forward_list.cpp @@ -1403,7 +1403,7 @@ namespace auto v = *data.begin(); using Type = decltype(v); - CHECK((std::is_same_v)); + CHECK((std::is_same::value)); decltype(data)::const_iterator itr = data.begin(); diff --git a/test/test_fsm.cpp b/test/test_fsm.cpp index cbf58e61..a057a055 100644 --- a/test/test_fsm.cpp +++ b/test/test_fsm.cpp @@ -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(); diff --git a/test/test_hfsm.cpp b/test/test_hfsm.cpp index dc1e3459..d7361c08 100644 --- a/test/test_hfsm.cpp +++ b/test/test_hfsm.cpp @@ -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(); diff --git a/test/test_list.cpp b/test/test_list.cpp index d65623ce..a24ac735 100644 --- a/test/test_list.cpp +++ b/test/test_list.cpp @@ -2166,7 +2166,7 @@ namespace auto v = *data.begin(); using Type = decltype(v); - CHECK((std::is_same_v)); + CHECK((std::is_same::value)); decltype(data)::const_iterator itr = data.begin(); diff --git a/test/test_map.cpp b/test/test_map.cpp index c4e11b69..4845e52b 100644 --- a/test/test_map.cpp +++ b/test/test_map.cpp @@ -1599,7 +1599,7 @@ namespace auto v = *data.begin(); using Type = decltype(v); - CHECK((std::is_same_v)); + CHECK((std::is_same::value)); CHECK_EQUAL(0, data.at("0")); CHECK_EQUAL(1, data.at("1")); diff --git a/test/test_message_timer_interrupt.cpp b/test/test_message_timer_interrupt.cpp index ee02cb44..1d8fe5d5 100644 --- a/test/test_message_timer_interrupt.cpp +++ b/test/test_message_timer_interrupt.cpp @@ -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 diff --git a/test/test_multimap.cpp b/test/test_multimap.cpp index 1d580e54..c44ffb1c 100644 --- a/test/test_multimap.cpp +++ b/test/test_multimap.cpp @@ -1620,7 +1620,7 @@ namespace auto v = *data.begin(); using Type = decltype(v); - CHECK((std::is_same_v)); + CHECK((std::is_same::value)); decltype(data)::const_iterator itr = data.begin(); diff --git a/test/test_multiset.cpp b/test/test_multiset.cpp index 3ac3eeb3..7e8b1851 100644 --- a/test/test_multiset.cpp +++ b/test/test_multiset.cpp @@ -1608,7 +1608,7 @@ namespace auto v = *data.begin(); using Type = decltype(v); - CHECK((std::is_same_v)); + CHECK((std::is_same::value)); decltype(data)::const_iterator itr = data.begin(); diff --git a/test/test_nth_type.cpp b/test/test_nth_type.cpp index 1258d235..a5339292 100644 --- a/test/test_nth_type.cpp +++ b/test/test_nth_type.cpp @@ -38,9 +38,9 @@ namespace //************************************************************************* TEST(test_nth_type) { - CHECK((std::is_same_v, int>)); - CHECK((std::is_same_v, long>)); - CHECK((std::is_same_v, double>)); + CHECK((std::is_same, int>::value)); + CHECK((std::is_same, long>::value)); + CHECK((std::is_same, double>::value)); } } } diff --git a/test/test_optional.cpp b/test/test_optional.cpp index 2b032f43..0ade0e9d 100644 --- a/test/test_optional.cpp +++ b/test/test_optional.cpp @@ -31,8 +31,6 @@ SOFTWARE. #include #include -#include - #include "etl/optional.h" #include "etl/vector.h" #include "data.h" diff --git a/test/test_parameter_pack.cpp b/test/test_parameter_pack.cpp index fce7c1e3..4c8adf8b 100644 --- a/test/test_parameter_pack.cpp +++ b/test/test_parameter_pack.cpp @@ -61,9 +61,9 @@ namespace // Static assert //CHECK_EQUAL(0U, Pack::index_of_type_v); - CHECK_EQUAL(0U, (etl::parameter_pack::index_of_type::value)); - CHECK_EQUAL(1U, (etl::parameter_pack::index_of_type::value)); - CHECK_EQUAL(2U, (etl::parameter_pack::index_of_type::value)); + CHECK_EQUAL(0U, (etl::parameter_pack::index_of_type::value)); + CHECK_EQUAL(1U, (etl::parameter_pack::index_of_type::value)); + CHECK_EQUAL(2U, (etl::parameter_pack::index_of_type::value)); // Static assert //CHECK_EQUAL(0U, (etl::parameter_pack_v)); @@ -73,16 +73,16 @@ namespace //************************************************************************* TEST(test_type_from_index) { - CHECK((std::is_same_v>)); - CHECK((std::is_same_v>)); - CHECK((std::is_same_v>)); + CHECK((std::is_same>::value)); + CHECK((std::is_same>::value)); + CHECK((std::is_same>::value)); // Static assert //CHECK((std::is_same_v>)); - CHECK((std::is_same_v>)); - CHECK((std::is_same_v>)); - CHECK((std::is_same_v>)); + CHECK((std::is_same>::value)); + CHECK((std::is_same>::value)); + CHECK((std::is_same>::value)); // Static assert //CHECK((std::is_same_v>)); diff --git a/test/test_poly_span_dynamic_extent.cpp b/test/test_poly_span_dynamic_extent.cpp index d9ab34e9..2378f564 100644 --- a/test/test_poly_span_dynamic_extent.cpp +++ b/test/test_poly_span_dynamic_extent.cpp @@ -158,7 +158,7 @@ namespace etl::poly_span 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 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 data{ Derived(1), Derived(2), Derived(3), Derived(4) }; etl::poly_span 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 data{ Derived(1), Derived(2), Derived(3), Derived(4) }; etl::poly_span 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 data{ Derived(1), Derived(2), Derived(3), Derived(4) }; etl::poly_span 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 data{ Derived(1), Derived(2), Derived(3), Derived(4) }; etl::poly_span 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>)); } @@ -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>)); } #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>)); } @@ -544,5 +545,6 @@ namespace CHECK_EQUAL(4U, s.size()); CHECK((std::is_same_v>)); } +#endif } } diff --git a/test/test_poly_span_fixed_extent.cpp b/test/test_poly_span_fixed_extent.cpp index 0c73eb17..3c51ddb3 100644 --- a/test/test_poly_span_fixed_extent.cpp +++ b/test/test_poly_span_fixed_extent.cpp @@ -158,7 +158,7 @@ namespace etl::poly_span 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 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 data{ Derived(1), Derived(2), Derived(3), Derived(4) }; etl::poly_span 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 data{ Derived(1), Derived(2), Derived(3), Derived(4) }; etl::poly_span 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 data{ Derived(1), Derived(2), Derived(3), Derived(4) }; etl::poly_span 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 data{ Derived(1), Derived(2), Derived(3), Derived(4) }; etl::poly_span 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>)); } @@ -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>)); } #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>)); } @@ -563,5 +564,6 @@ namespace CHECK_EQUAL(4U, s.size()); CHECK((std::is_same_v>)); } +#endif } } diff --git a/test/test_pseudo_moving_average.cpp b/test/test_pseudo_moving_average.cpp index 5926eb83..b640762b 100644 --- a/test/test_pseudo_moving_average.cpp +++ b/test/test_pseudo_moving_average.cpp @@ -44,8 +44,8 @@ namespace //************************************************************************* TEST(integral_signed_average_positive) { - using CMA = etl::pseudo_moving_average; - CMA cma(0); + using PMA = etl::pseudo_moving_average; + PMA cma(0); CHECK_EQUAL(0, cma.value()); @@ -65,10 +65,10 @@ namespace //************************************************************************* TEST(integral_signed_average_positive_via_iterator) { - std::array data{ 9, 1, 8, 2, 7, 3, 6, 4, 5 }; + std::array data{ 9, 1, 8, 2, 7, 3, 6, 4, 5 }; - using CMA = etl::pseudo_moving_average; - CMA cma(0); + using PMA = etl::pseudo_moving_average; + PMA cma(0); CHECK_EQUAL(0, cma.value()); @@ -80,8 +80,8 @@ namespace //************************************************************************* TEST(integral_signed_average_negative) { - using CMA = etl::pseudo_moving_average; - CMA cma(0); + using PMA = etl::pseudo_moving_average; + PMA cma(0); CHECK_EQUAL(0, cma.value()); @@ -101,10 +101,10 @@ namespace //************************************************************************* TEST(integral_signed_average_negative_via_iterator) { - std::array data{ -9, -1, -8, -2, -7, -3, -6, -4, -5 }; + std::array data{ -9, -1, -8, -2, -7, -3, -6, -4, -5 }; - using CMA = etl::pseudo_moving_average; - CMA cma(0); + using PMA = etl::pseudo_moving_average; + PMA cma(0); CHECK_EQUAL(0, cma.value()); @@ -116,8 +116,8 @@ namespace //************************************************************************* TEST(integral_unsigned_average_positive) { - using CMA = etl::pseudo_moving_average; - CMA cma(0U); + using PMA = etl::pseudo_moving_average; + PMA cma(0U); CHECK_EQUAL(0U, cma.value()); @@ -137,10 +137,10 @@ namespace //************************************************************************* TEST(integral_unsigned_average_positive_via_iterator) { - std::array data{ 9U, 1U, 8U, 2U, 7U, 3U, 6U, 4U, 5U }; + std::array data{ 9U, 1U, 8U, 2U, 7U, 3U, 6U, 4U, 5U }; - using CMA = etl::pseudo_moving_average; - CMA cma(0U); + using PMA = etl::pseudo_moving_average; + 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; - CMA cma(0, SAMPLE_SIZE * 2U); + using PMA = etl::pseudo_moving_average; + 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 data{ 9, 1, 8, 2, 7, 3, 6, 4, 5 }; + std::array data{ 9, 1, 8, 2, 7, 3, 6, 4, 5 }; - using CMA = etl::pseudo_moving_average; - CMA cma(0, SAMPLE_SIZE * 2U); + using PMA = etl::pseudo_moving_average; + 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; - CMA cma(0, SAMPLE_SIZE * 2U); + using PMA = etl::pseudo_moving_average; + 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 data{ -9, -1, -8, -2, -7, -3, -6, -4, -5 }; + std::array data{ -9, -1, -8, -2, -7, -3, -6, -4, -5 }; - using CMA = etl::pseudo_moving_average; - CMA cma(0, SAMPLE_SIZE * 2U); + using PMA = etl::pseudo_moving_average; + 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; - CMA cma(0U, SAMPLE_SIZE * 2U); + using PMA = etl::pseudo_moving_average; + 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 data{ 9U, 1U, 8U, 2U, 7U, 3U, 6U, 4U, 5U }; + std::array data{ 9U, 1U, 8U, 2U, 7U, 3U, 6U, 4U, 5U }; - using CMA = etl::pseudo_moving_average; - CMA cma(0U, SAMPLE_SIZE * 2U); + using PMA = etl::pseudo_moving_average; + 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; - CMA cma(0); + using PMA = etl::pseudo_moving_average; + PMA cma(0); CHECK_EQUAL(0.0, cma.value()); @@ -293,10 +293,10 @@ namespace //************************************************************************* TEST(floating_point_average_via_iterator) { - std::array data{ 9.0, 1.0, 8.0, 2.0, 7.0, 3.0, 6.0, 4.0, 5.0 }; + std::array 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; - CMA cma(0); + using PMA = etl::pseudo_moving_average; + 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; - CMA cma(0, SAMPLE_SIZE * 2); + using PMA = etl::pseudo_moving_average; + 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 data{ 9.0, 1.0, 8.0, 2.0, 7.0, 3.0, 6.0, 4.0, 5.0 }; + std::array 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; - CMA cma(0, SAMPLE_SIZE * 2); + using PMA = etl::pseudo_moving_average; + PMA cma(0, SAMPLE_SIZE * 2); CHECK_EQUAL(0.0, cma.value()); diff --git a/test/test_set.cpp b/test/test_set.cpp index 7a3595a6..752d6e13 100644 --- a/test/test_set.cpp +++ b/test/test_set.cpp @@ -1417,7 +1417,7 @@ namespace auto v = *data.begin(); using Type = decltype(v); - CHECK((std::is_same_v)); + CHECK((std::is_same::value)); decltype(data)::const_iterator itr = data.begin(); diff --git a/test/test_singleton.cpp b/test/test_singleton.cpp index 01f99ce3..46b747bd 100644 --- a/test/test_singleton.cpp +++ b/test/test_singleton.cpp @@ -62,7 +62,7 @@ namespace //************************************************************************* TEST(test1) { - CHECK((std::is_same_v)); + CHECK((std::is_same::value)); CHECK(!Test_Singleton::is_valid()); CHECK_THROW(Test_Singleton::instance(), etl::singleton_not_created); diff --git a/test/test_span_dynamic_extent.cpp b/test/test_span_dynamic_extent.cpp index d26178d1..48fc6566 100644 --- a/test/test_span_dynamic_extent.cpp +++ b/test/test_span_dynamic_extent.cpp @@ -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>)); } @@ -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>)); } #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>)); } @@ -691,6 +692,7 @@ namespace CHECK_EQUAL(4U, s.size()); CHECK((std::is_same_v>)); } +#endif //************************************************************************* void f_issue_481(etl::span) @@ -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 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 }; 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 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 }; 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 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 }; 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 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 }; 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 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 }; 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 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 }; 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 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 }; 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 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 }; 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 data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + etl::array 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 data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + etl::array 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 data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + etl::array 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 data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + etl::array 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 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 }; 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 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 }; 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 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 }; 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 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 }; int i; diff --git a/test/test_span_fixed_extent.cpp b/test/test_span_fixed_extent.cpp index 7e6e327a..185f85af 100644 --- a/test/test_span_fixed_extent.cpp +++ b/test/test_span_fixed_extent.cpp @@ -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>)); } @@ -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>)); } #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>)); } @@ -681,6 +682,7 @@ namespace CHECK_EQUAL(4U, s.size()); CHECK((std::is_same_v>)); } +#endif //************************************************************************* void f_issue_481(etl::span) @@ -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 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 }; 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 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 }; View view{ data }; etl::span 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 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 }; 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 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 }; View view{ data }; etl::span 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 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 }; 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 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 }; View view{ data }; etl::span 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 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 }; 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 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 }; View view{ data }; etl::span 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 data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + etl::array 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 data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + etl::array 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 data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + etl::array 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 data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + etl::array 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 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 }; 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 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 }; 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 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 }; 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 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 }; View view1{ data1 }; CView view2{ data1 }; diff --git a/test/test_string_char_external_buffer.cpp b/test/test_string_char_external_buffer.cpp index bb20ef7e..ec49a3de 100644 --- a/test/test_string_char_external_buffer.cpp +++ b/test/test_string_char_external_buffer.cpp @@ -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()); diff --git a/test/test_string_u16.cpp b/test/test_string_u16.cpp index 63d24b34..b9951fe6 100644 --- a/test/test_string_u16.cpp +++ b/test/test_string_u16.cpp @@ -66,12 +66,12 @@ namespace { static const size_t SIZE = 11; - typedef etl::u16string 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; + 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) { diff --git a/test/test_string_u16_external_buffer.cpp b/test/test_string_u16_external_buffer.cpp index c4f72c12..b013f52c 100644 --- a/test/test_string_u16_external_buffer.cpp +++ b/test/test_string_u16_external_buffer.cpp @@ -74,10 +74,9 @@ namespace using TextT = etl::u16string; using Compare_Text = std::u16string; using value_t = Text::value_type; - - using TextBuffer = std::array; - using TextBufferL = std::array; - using TextBufferS = std::array; + using TextBuffer = std::array; + using TextBufferL = std::array; + using TextBufferS = std::array; 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()); } diff --git a/test/test_string_u32.cpp b/test/test_string_u32.cpp index 266a8f3d..a9ce49d8 100644 --- a/test/test_string_u32.cpp +++ b/test/test_string_u32.cpp @@ -66,12 +66,12 @@ namespace { static const size_t SIZE = 11; - typedef etl::u32string 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; + 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()); } diff --git a/test/test_string_u32_external_buffer.cpp b/test/test_string_u32_external_buffer.cpp index 0d9b9d9b..133f2231 100644 --- a/test/test_string_u32_external_buffer.cpp +++ b/test/test_string_u32_external_buffer.cpp @@ -74,10 +74,9 @@ namespace using TextT = etl::u32string; using Compare_Text = std::u32string; using value_t = Text::value_type; - - using TextBuffer = std::array; - using TextBufferL = std::array; - using TextBufferS = std::array; + using TextBuffer = std::array; + using TextBufferL = std::array; + using TextBufferS = std::array; 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()); } diff --git a/test/test_string_utilities_std.cpp b/test/test_string_utilities_std.cpp index 3345e1c8..bdc3fe72 100644 --- a/test/test_string_utilities_std.cpp +++ b/test/test_string_utilities_std.cpp @@ -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 @@ -1613,3 +1616,5 @@ namespace } }; } + +#endif diff --git a/test/test_string_utilities_std_u16.cpp b/test/test_string_utilities_std_u16.cpp index 2c2205aa..20da6ee4 100644 --- a/test/test_string_utilities_std_u16.cpp +++ b/test/test_string_utilities_std_u16.cpp @@ -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 @@ -1588,3 +1591,5 @@ namespace } }; } + +#endif diff --git a/test/test_string_utilities_std_u32.cpp b/test/test_string_utilities_std_u32.cpp index 6a4a6b81..fe0e68fa 100644 --- a/test/test_string_utilities_std_u32.cpp +++ b/test/test_string_utilities_std_u32.cpp @@ -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 @@ -1586,3 +1589,5 @@ namespace } }; } + +#endif diff --git a/test/test_string_utilities_std_wchar_t.cpp b/test/test_string_utilities_std_wchar_t.cpp index 7e48e8a6..994a35a7 100644 --- a/test/test_string_utilities_std_wchar_t.cpp +++ b/test/test_string_utilities_std_wchar_t.cpp @@ -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 @@ -1586,3 +1589,5 @@ namespace } }; } + +#endif diff --git a/test/test_string_wchar_t.cpp b/test/test_string_wchar_t.cpp index a1add733..82f3a8f0 100644 --- a/test/test_string_wchar_t.cpp +++ b/test/test_string_wchar_t.cpp @@ -66,12 +66,12 @@ namespace { static const size_t SIZE = 11; - typedef etl::wstring 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; + 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()); } diff --git a/test/test_string_wchar_t_external_buffer.cpp b/test/test_string_wchar_t_external_buffer.cpp index 9d240997..7c092548 100644 --- a/test/test_string_wchar_t_external_buffer.cpp +++ b/test/test_string_wchar_t_external_buffer.cpp @@ -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()); } diff --git a/test/test_task_scheduler.cpp b/test/test_task_scheduler.cpp index 4e5e95eb..76350e9b 100644 --- a/test/test_task_scheduler.cpp +++ b/test/test_task_scheduler.cpp @@ -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" }; diff --git a/test/test_unordered_map.cpp b/test/test_unordered_map.cpp index 4e9c347a..9a587941 100644 --- a/test/test_unordered_map.cpp +++ b/test/test_unordered_map.cpp @@ -1190,7 +1190,7 @@ namespace TEST(test_iterator_value_types_bug_584) { using Map = etl::unordered_map; - CHECK((!std::is_same_v)); + CHECK((!std::is_same::value)); } }; } diff --git a/test/test_unordered_multimap.cpp b/test/test_unordered_multimap.cpp index ac339e7d..99c2bae1 100644 --- a/test/test_unordered_multimap.cpp +++ b/test/test_unordered_multimap.cpp @@ -1026,7 +1026,7 @@ namespace TEST(test_iterator_value_types_bug_584) { using Map = etl::unordered_multimap; - CHECK((!std::is_same_v)); + CHECK((!std::is_same::value)); } TEST(test_parameterized_eq) diff --git a/test/test_unordered_multiset.cpp b/test/test_unordered_multiset.cpp index 5c9d6d23..012f5b4f 100644 --- a/test/test_unordered_multiset.cpp +++ b/test/test_unordered_multiset.cpp @@ -902,7 +902,7 @@ namespace TEST(test_iterator_value_types_bug_584) { using Set = etl::unordered_multiset; - CHECK((!std::is_same_v)); + CHECK((!std::is_same::value)); } TEST(test_parameterized_eq) diff --git a/test/test_unordered_set.cpp b/test/test_unordered_set.cpp index d560585a..8ad22206 100644 --- a/test/test_unordered_set.cpp +++ b/test/test_unordered_set.cpp @@ -861,7 +861,7 @@ namespace TEST(test_iterator_value_types_bug_584) { using Set = etl::unordered_set; - CHECK((!std::is_same_v)); + CHECK((!std::is_same::value)); } }; } diff --git a/test/test_utility.cpp b/test/test_utility.cpp index fcb16bd9..5b42d9d6 100644 --- a/test/test_utility.cpp +++ b/test/test_utility.cpp @@ -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 fw1(TestGlobal); CHECK_EQUAL(2, fw1(1)); } diff --git a/test/test_variant_variadic.cpp b/test/test_variant_variadic.cpp index baee1aa6..305e8f9a 100644 --- a/test/test_variant_variadic.cpp +++ b/test/test_variant_variadic.cpp @@ -32,14 +32,14 @@ SOFTWARE. #include "etl/visitor.h" #include "etl/overload.h" +#if ETL_USING_CPP17 + #include #include #include #include -#include #include - -#if ETL_USING_CPP17 +#include namespace { diff --git a/test/test_vector.cpp b/test/test_vector.cpp index a31e3ea6..aaa46997 100644 --- a/test/test_vector.cpp +++ b/test/test_vector.cpp @@ -1380,7 +1380,7 @@ namespace auto data = etl::make_vector(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); using Type = std::remove_reference_t; - CHECK((std::is_same_v)); + CHECK((std::is_same::value)); CHECK_EQUAL(0, data[0]); CHECK_EQUAL(1, data[1]); diff --git a/test/test_vector_pointer_external_buffer.cpp b/test/test_vector_pointer_external_buffer.cpp index 65afe8ea..cfec1877 100644 --- a/test/test_vector_pointer_external_buffer.cpp +++ b/test/test_vector_pointer_external_buffer.cpp @@ -33,6 +33,8 @@ SOFTWARE. #include #include +#include + #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) diff --git a/test/vs2022/etl.sln b/test/vs2022/etl.sln index 75fa0503..ce2d8dcb 100644 --- a/test/vs2022/etl.sln +++ b/test/vs2022/etl.sln @@ -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 diff --git a/test/vs2022/etl.vcxproj b/test/vs2022/etl.vcxproj index 4674ea2d..7db39d34 100644 --- a/test/vs2022/etl.vcxproj +++ b/test/vs2022/etl.vcxproj @@ -113,6 +113,22 @@ Debug MSVC - No Checks x64 + + Debug MSVC C++14 - No STL + Win32 + + + Debug MSVC C++14 - No STL + x64 + + + Debug MSVC C++14 + Win32 + + + Debug MSVC C++14 + x64 + Debug MSVC C++20 - No STL Win32 @@ -261,6 +277,13 @@ Unicode true + + Application + true + v143 + Unicode + true + Application true @@ -319,6 +342,13 @@ Unicode true + + Application + true + v143 + Unicode + true + Application true @@ -436,6 +466,12 @@ v143 Unicode + + Application + true + v143 + Unicode + Application true @@ -490,6 +526,12 @@ v143 Unicode + + Application + true + v143 + Unicode + Application true @@ -630,6 +672,9 @@ + + + @@ -657,6 +702,9 @@ + + + @@ -711,6 +759,9 @@ + + + @@ -738,6 +789,9 @@ + + + @@ -821,6 +875,11 @@ true $(Configuration)\ + + false + true + $(Configuration)\ + false true @@ -867,6 +926,11 @@ true $(Configuration)\ + + false + true + $(Configuration)\ + false true @@ -957,6 +1021,10 @@ true true + + true + true + true true @@ -993,6 +1061,10 @@ true true + + true + true + true true @@ -1183,7 +1255,31 @@ true stdcpp20 - EditAndContinue + ProgramDatabase + /Zc:__cplusplus %(AdditionalOptions) + true + + + Console + true + + + "$(OutDir)\etl.exe" + + + + + + + Level2 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ../../../unittest-cpp/;../../include;../../test + + + true + stdcpp14 + ProgramDatabase /Zc:__cplusplus %(AdditionalOptions) true @@ -1404,6 +1500,30 @@ "$(OutDir)etl.exe" + + + + + Level2 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING;ETL_NO_STL;ETL_FORCE_STD_INITIALIZER_LIST;%(PreprocessorDefinitions) + ./;../../../unittest-cpp/;../../include;../../test + + + true + stdcpp14 + ProgramDatabase + /Zc:__cplusplus %(AdditionalOptions) + true + + + Console + true + + + "$(OutDir)etl.exe" + + @@ -1849,6 +1969,27 @@ $(OutDir)\etl.exe + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ../../unittest-cpp/UnitTest++/;../../include/etl;../../test + + + false + stdcpp14 + + + Console + true + + + $(OutDir)\etl.exe + + @@ -2038,6 +2179,27 @@ $(OutDir)\etl.exe + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ../../unittest-cpp/UnitTest++/;../../include/etl;../../test + + + false + stdcpp14 + + + Console + true + + + $(OutDir)\etl.exe + + @@ -2779,8 +2941,10 @@ true true true + true true true + true true true true @@ -2808,8 +2972,10 @@ true true true + true true true + true true true true @@ -2837,9 +3003,11 @@ true true true + true true true true + true true true true @@ -2866,8 +3034,10 @@ true true true + true true true + true true true true @@ -2940,8 +3110,10 @@ true true true + true true true + true true true true @@ -2969,8 +3141,10 @@ true true true + true true true + true true true true @@ -2998,9 +3172,11 @@ true true true + true true true true + true true true true @@ -3027,8 +3203,10 @@ true true true + true true true + true true true true @@ -3059,8 +3237,10 @@ true true true + true true true + true true true true @@ -3096,6 +3276,7 @@ true true true + true true true true @@ -3105,6 +3286,7 @@ true true true + true true true true @@ -3130,6 +3312,7 @@ true true true + true true true true @@ -3139,6 +3322,7 @@ true true true + true true true true @@ -3164,6 +3348,7 @@ true true true + true true true true @@ -3173,6 +3358,7 @@ true true true + true true true true @@ -3198,6 +3384,7 @@ true true true + true true true true @@ -3207,6 +3394,7 @@ true true true + true true true true @@ -3232,6 +3420,7 @@ true true true + true true true true @@ -3241,6 +3430,7 @@ true true true + true true true true @@ -3266,6 +3456,7 @@ true true true + true true true true @@ -3275,6 +3466,7 @@ true true true + true true true true @@ -3300,6 +3492,7 @@ true true true + true true true true @@ -3309,6 +3502,7 @@ true true true + true true true true @@ -3334,6 +3528,7 @@ true true true + true true true true @@ -3343,6 +3538,7 @@ true true true + true true true true @@ -3368,6 +3564,7 @@ true true true + true true true true @@ -3377,6 +3574,7 @@ true true true + true true true true @@ -3402,6 +3600,7 @@ true true true + true true true true @@ -3411,6 +3610,7 @@ true true true + true true true true @@ -3430,6 +3630,7 @@ true true true + true true true true @@ -3445,6 +3646,7 @@ true true true + true true true true @@ -3464,7 +3666,9 @@ true true true + true true + true true true true @@ -3499,6 +3703,7 @@ true true true + true true true true @@ -3508,6 +3713,7 @@ true true true + true true true true @@ -3523,10 +3729,12 @@ true + true true true true true + true true true true @@ -3562,6 +3770,7 @@ true true true + true true true true @@ -3571,6 +3780,7 @@ true true true + true true true true @@ -3596,6 +3806,7 @@ true true true + true true true true @@ -3605,6 +3816,7 @@ true true true + true true true true @@ -3630,6 +3842,7 @@ true true true + true true true true @@ -3639,6 +3852,7 @@ true true true + true true true true @@ -3664,6 +3878,7 @@ true true true + true true true true @@ -3673,6 +3888,7 @@ true true true + true true true true @@ -3690,8 +3906,10 @@ true true true + true true true + true true true true @@ -3722,9 +3940,11 @@ true true true + true true true true + true true true true @@ -3758,6 +3978,7 @@ true true true + true true true true @@ -3767,6 +3988,7 @@ true true true + true true true true @@ -3792,6 +4014,7 @@ true true true + true true true true @@ -3801,6 +4024,7 @@ true true true + true true true true @@ -3826,6 +4050,7 @@ true true true + true true true true @@ -3835,6 +4060,7 @@ true true true + true true true true @@ -3854,9 +4080,11 @@ true true true + true true true true + true true true true @@ -3882,8 +4110,10 @@ true true true + true true true + true true true true @@ -3912,8 +4142,10 @@ true true true + true true true + true true true true @@ -3950,6 +4182,7 @@ true true true + true true true true @@ -3959,6 +4192,7 @@ true true true + true true true true @@ -3984,6 +4218,7 @@ true true true + true true true true @@ -3993,6 +4228,7 @@ true true true + true true true true @@ -4018,6 +4254,7 @@ true true true + true true true true @@ -4027,6 +4264,7 @@ true true true + true true true true @@ -4044,8 +4282,10 @@ true true true + true true true + true true true true @@ -4081,6 +4321,7 @@ true true true + true true true true @@ -4090,6 +4331,7 @@ true true true + true true true true @@ -4115,6 +4357,7 @@ true true true + true true true true @@ -4124,6 +4367,7 @@ true true true + true true true true @@ -4149,6 +4393,7 @@ true true true + true true true true @@ -4158,6 +4403,7 @@ true true true + true true true true @@ -4183,6 +4429,7 @@ true true true + true true true true @@ -4192,6 +4439,7 @@ true true true + true true true true @@ -4217,6 +4465,7 @@ true true true + true true true true @@ -4226,6 +4475,7 @@ true true true + true true true true @@ -4251,6 +4501,7 @@ true true true + true true true true @@ -4260,6 +4511,7 @@ true true true + true true true true @@ -4285,6 +4537,7 @@ true true true + true true true true @@ -4294,6 +4547,7 @@ true true true + true true true true @@ -4319,6 +4573,7 @@ true true true + true true true true @@ -4328,6 +4583,7 @@ true true true + true true true true @@ -4353,6 +4609,7 @@ true true true + true true true true @@ -4362,6 +4619,7 @@ true true true + true true true true @@ -4387,6 +4645,7 @@ true true true + true true true true @@ -4396,6 +4655,7 @@ true true true + true true true true @@ -4421,6 +4681,7 @@ true true true + true true true true @@ -4430,6 +4691,7 @@ true true true + true true true true @@ -4455,6 +4717,7 @@ true true true + true true true true @@ -4464,6 +4727,7 @@ true true true + true true true true @@ -4489,6 +4753,7 @@ true true true + true true true true @@ -4498,6 +4763,7 @@ true true true + true true true true @@ -4523,6 +4789,7 @@ true true true + true true true true @@ -4532,6 +4799,7 @@ true true true + true true true true @@ -4557,6 +4825,7 @@ true true true + true true true true @@ -4566,6 +4835,7 @@ true true true + true true true true @@ -4591,6 +4861,7 @@ true true true + true true true true @@ -4600,6 +4871,7 @@ true true true + true true true true @@ -4625,6 +4897,7 @@ true true true + true true true true @@ -4634,6 +4907,7 @@ true true true + true true true true @@ -4659,6 +4933,7 @@ true true true + true true true true @@ -4668,6 +4943,7 @@ true true true + true true true true @@ -4693,6 +4969,7 @@ true true true + true true true true @@ -4702,6 +4979,7 @@ true true true + true true true true @@ -4727,6 +5005,7 @@ true true true + true true true true @@ -4736,6 +5015,7 @@ true true true + true true true true @@ -4753,8 +5033,10 @@ true true true + true true true + true true true true @@ -4789,6 +5071,7 @@ true true true + true true true true @@ -4798,6 +5081,7 @@ true true true + true true true true @@ -4823,6 +5107,7 @@ true true true + true true true true @@ -4832,6 +5117,7 @@ true true true + true true true true @@ -4857,6 +5143,7 @@ true true true + true true true true @@ -4866,6 +5153,7 @@ true true true + true true true true @@ -4891,6 +5179,7 @@ true true true + true true true true @@ -4900,6 +5189,7 @@ true true true + true true true true @@ -4925,6 +5215,7 @@ true true true + true true true true @@ -4934,6 +5225,7 @@ true true true + true true true true @@ -4959,6 +5251,7 @@ true true true + true true true true @@ -4968,6 +5261,7 @@ true true true + true true true true @@ -4993,6 +5287,7 @@ true true true + true true true true @@ -5002,6 +5297,7 @@ true true true + true true true true @@ -5027,6 +5323,7 @@ true true true + true true true true @@ -5036,6 +5333,7 @@ true true true + true true true true @@ -5061,6 +5359,7 @@ true true true + true true true true @@ -5070,6 +5369,7 @@ true true true + true true true true @@ -5095,6 +5395,7 @@ true true true + true true true true @@ -5104,6 +5405,7 @@ true true true + true true true true @@ -5129,6 +5431,7 @@ true true true + true true true true @@ -5138,6 +5441,7 @@ true true true + true true true true @@ -5163,6 +5467,7 @@ true true true + true true true true @@ -5172,6 +5477,7 @@ true true true + true true true true @@ -5197,6 +5503,7 @@ true true true + true true true true @@ -5206,6 +5513,7 @@ true true true + true true true true @@ -5231,6 +5539,7 @@ true true true + true true true true @@ -5240,6 +5549,7 @@ true true true + true true true true @@ -5265,6 +5575,7 @@ true true true + true true true true @@ -5274,6 +5585,7 @@ true true true + true true true true @@ -5299,6 +5611,7 @@ true true true + true true true true @@ -5308,6 +5621,7 @@ true true true + true true true true @@ -5333,6 +5647,7 @@ true true true + true true true true @@ -5342,6 +5657,7 @@ true true true + true true true true @@ -5367,6 +5683,7 @@ true true true + true true true true @@ -5376,6 +5693,7 @@ true true true + true true true true @@ -5401,6 +5719,7 @@ true true true + true true true true @@ -5410,6 +5729,7 @@ true true true + true true true true @@ -5435,6 +5755,7 @@ true true true + true true true true @@ -5444,6 +5765,7 @@ true true true + true true true true @@ -5469,6 +5791,7 @@ true true true + true true true true @@ -5478,6 +5801,7 @@ true true true + true true true true @@ -5503,6 +5827,7 @@ true true true + true true true true @@ -5512,6 +5837,7 @@ true true true + true true true true @@ -5537,6 +5863,7 @@ true true true + true true true true @@ -5546,6 +5873,7 @@ true true true + true true true true @@ -5571,6 +5899,7 @@ true true true + true true true true @@ -5580,6 +5909,7 @@ true true true + true true true true @@ -5605,6 +5935,7 @@ true true true + true true true true @@ -5614,6 +5945,7 @@ true true true + true true true true @@ -5639,6 +5971,7 @@ true true true + true true true true @@ -5648,6 +5981,7 @@ true true true + true true true true @@ -5673,6 +6007,7 @@ true true true + true true true true @@ -5682,6 +6017,7 @@ true true true + true true true true @@ -5707,6 +6043,7 @@ true true true + true true true true @@ -5716,6 +6053,7 @@ true true true + true true true true @@ -5741,6 +6079,7 @@ true true true + true true true true @@ -5750,6 +6089,7 @@ true true true + true true true true @@ -5775,6 +6115,7 @@ true true true + true true true true @@ -5784,6 +6125,7 @@ true true true + true true true true @@ -5809,6 +6151,7 @@ true true true + true true true true @@ -5818,6 +6161,7 @@ true true true + true true true true @@ -5835,8 +6179,10 @@ true true true + true true true + true true true true @@ -5863,8 +6209,10 @@ true true true + true true true + true true true true @@ -5892,8 +6240,10 @@ true true true + true true true + true true true true @@ -5929,6 +6279,7 @@ true true true + true true true true @@ -5938,6 +6289,7 @@ true true true + true true true true @@ -5963,6 +6315,7 @@ true true true + true true true true @@ -5972,6 +6325,7 @@ true true true + true true true true @@ -5997,6 +6351,7 @@ true true true + true true true true @@ -6006,6 +6361,7 @@ true true true + true true true true @@ -6031,6 +6387,7 @@ true true true + true true true true @@ -6040,6 +6397,7 @@ true true true + true true true true @@ -6065,6 +6423,7 @@ true true true + true true true true @@ -6074,6 +6433,7 @@ true true true + true true true true @@ -6091,8 +6451,10 @@ true true true + true true true + true true true true @@ -6118,8 +6480,10 @@ true true true + true true true + true true true true @@ -6155,6 +6519,7 @@ true true true + true true true true @@ -6164,6 +6529,7 @@ true true true + true true true true @@ -6189,6 +6555,7 @@ true true true + true true true true @@ -6198,6 +6565,7 @@ true true true + true true true true @@ -6223,6 +6591,7 @@ true true true + true true true true @@ -6232,6 +6601,7 @@ true true true + true true true true @@ -6257,6 +6627,7 @@ true true true + true true true true @@ -6266,6 +6637,7 @@ true true true + true true true true @@ -6291,6 +6663,7 @@ true true true + true true true true @@ -6300,6 +6673,7 @@ true true true + true true true true @@ -6325,6 +6699,7 @@ true true true + true true true true @@ -6334,6 +6709,7 @@ true true true + true true true true @@ -6359,6 +6735,7 @@ true true true + true true true true @@ -6368,6 +6745,7 @@ true true true + true true true true @@ -6393,6 +6771,7 @@ true true true + true true true true @@ -6402,6 +6781,7 @@ true true true + true true true true @@ -6427,6 +6807,7 @@ true true true + true true true true @@ -6436,6 +6817,7 @@ true true true + true true true true @@ -6461,6 +6843,7 @@ true true true + true true true true @@ -6470,6 +6853,7 @@ true true true + true true true true @@ -6495,6 +6879,7 @@ true true true + true true true true @@ -6504,6 +6889,7 @@ true true true + true true true true @@ -6529,6 +6915,7 @@ true true true + true true true true @@ -6538,6 +6925,7 @@ true true true + true true true true @@ -6563,6 +6951,7 @@ true true true + true true true true @@ -6572,6 +6961,7 @@ true true true + true true true true @@ -6597,6 +6987,7 @@ true true true + true true true true @@ -6606,6 +6997,7 @@ true true true + true true true true @@ -6631,6 +7023,7 @@ true true true + true true true true @@ -6640,6 +7033,7 @@ true true true + true true true true @@ -6665,6 +7059,7 @@ true true true + true true true true @@ -6674,6 +7069,7 @@ true true true + true true true true @@ -6699,6 +7095,7 @@ true true true + true true true true @@ -6708,6 +7105,7 @@ true true true + true true true true @@ -6733,6 +7131,7 @@ true true true + true true true true @@ -6742,6 +7141,7 @@ true true true + true true true true @@ -6767,6 +7167,7 @@ true true true + true true true true @@ -6776,6 +7177,7 @@ true true true + true true true true @@ -6801,6 +7203,7 @@ true true true + true true true true @@ -6810,6 +7213,7 @@ true true true + true true true true @@ -6835,6 +7239,7 @@ true true true + true true true true @@ -6844,6 +7249,7 @@ true true true + true true true true @@ -6869,6 +7275,7 @@ true true true + true true true true @@ -6878,6 +7285,7 @@ true true true + true true true true @@ -6903,6 +7311,7 @@ true true true + true true true true @@ -6912,6 +7321,7 @@ true true true + true true true true @@ -6937,6 +7347,7 @@ true true true + true true true true @@ -6946,6 +7357,7 @@ true true true + true true true true @@ -6971,6 +7383,7 @@ true true true + true true true true @@ -6980,6 +7393,7 @@ true true true + true true true true @@ -7005,6 +7419,7 @@ true true true + true true true true @@ -7014,6 +7429,7 @@ true true true + true true true true @@ -7039,6 +7455,7 @@ true true true + true true true true @@ -7048,6 +7465,7 @@ true true true + true true true true @@ -7073,6 +7491,7 @@ true true true + true true true true @@ -7082,6 +7501,7 @@ true true true + true true true true @@ -7107,6 +7527,7 @@ true true true + true true true true @@ -7116,6 +7537,7 @@ true true true + true true true true @@ -7141,6 +7563,7 @@ true true true + true true true true @@ -7150,6 +7573,7 @@ true true true + true true true true @@ -7169,8 +7593,10 @@ true true true + true true true + true true true true @@ -7205,6 +7631,7 @@ true true true + true true true true @@ -7214,6 +7641,7 @@ true true true + true true true true @@ -7239,6 +7667,7 @@ true true true + true true true true @@ -7248,6 +7677,7 @@ true true true + true true true true @@ -7273,6 +7703,7 @@ true true true + true true true true @@ -7282,6 +7713,7 @@ true true true + true true true true @@ -7307,6 +7739,7 @@ true true true + true true true true @@ -7316,6 +7749,7 @@ true true true + true true true true @@ -7341,6 +7775,7 @@ true true true + true true true true @@ -7350,6 +7785,7 @@ true true true + true true true true @@ -7375,6 +7811,7 @@ true true true + true true true true @@ -7384,6 +7821,7 @@ true true true + true true true true @@ -7409,6 +7847,7 @@ true true true + true true true true @@ -7418,6 +7857,7 @@ true true true + true true true true @@ -7443,6 +7883,7 @@ true true true + true true true true @@ -7452,6 +7893,7 @@ true true true + true true true true @@ -7477,6 +7919,7 @@ true true true + true true true true @@ -7486,6 +7929,7 @@ true true true + true true true true @@ -7511,6 +7955,7 @@ true true true + true true true true @@ -7520,6 +7965,7 @@ true true true + true true true true @@ -7545,6 +7991,7 @@ true true true + true true true true @@ -7554,6 +8001,7 @@ true true true + true true true true @@ -7579,6 +8027,7 @@ true true true + true true true true @@ -7588,6 +8037,7 @@ true true true + true true true true @@ -7613,6 +8063,7 @@ true true true + true true true true @@ -7622,6 +8073,7 @@ true true true + true true true true @@ -7647,6 +8099,7 @@ true true true + true true true true @@ -7656,6 +8109,7 @@ true true true + true true true true @@ -7681,6 +8135,7 @@ true true true + true true true true @@ -7690,6 +8145,7 @@ true true true + true true true true @@ -7715,6 +8171,7 @@ true true true + true true true true @@ -7724,6 +8181,7 @@ true true true + true true true true @@ -7749,6 +8207,7 @@ true true true + true true true true @@ -7758,6 +8217,7 @@ true true true + true true true true @@ -7783,6 +8243,7 @@ true true true + true true true true @@ -7792,6 +8253,7 @@ true true true + true true true true @@ -7817,6 +8279,7 @@ true true true + true true true true @@ -7826,6 +8289,7 @@ true true true + true true true true @@ -7851,6 +8315,7 @@ true true true + true true true true @@ -7860,6 +8325,7 @@ true true true + true true true true @@ -7885,6 +8351,7 @@ true true true + true true true true @@ -7894,6 +8361,7 @@ true true true + true true true true @@ -7919,6 +8387,7 @@ true true true + true true true true @@ -7928,6 +8397,7 @@ true true true + true true true true @@ -7953,6 +8423,7 @@ true true true + true true true true @@ -7962,6 +8433,7 @@ true true true + true true true true @@ -7987,6 +8459,7 @@ true true true + true true true true @@ -7996,6 +8469,7 @@ true true true + true true true true @@ -8021,6 +8495,7 @@ true true true + true true true true @@ -8030,6 +8505,7 @@ true true true + true true true true @@ -8055,6 +8531,7 @@ true true true + true true true true @@ -8064,6 +8541,7 @@ true true true + true true true true @@ -8089,6 +8567,7 @@ true true true + true true true true @@ -8098,6 +8577,7 @@ true true true + true true true true @@ -8123,6 +8603,7 @@ true true true + true true true true @@ -8132,6 +8613,7 @@ true true true + true true true true @@ -8157,6 +8639,7 @@ true true true + true true true true @@ -8166,6 +8649,7 @@ true true true + true true true true @@ -8191,6 +8675,7 @@ true true true + true true true true @@ -8200,6 +8685,7 @@ true true true + true true true true @@ -8225,6 +8711,7 @@ true true true + true true true true @@ -8234,6 +8721,7 @@ true true true + true true true true @@ -8253,9 +8741,11 @@ true true true + true true true true + true true true true @@ -8281,8 +8771,10 @@ true true true + true true true + true true true true @@ -8311,8 +8803,10 @@ true true true + true true true + true true true true @@ -8349,6 +8843,7 @@ true true true + true true true true @@ -8358,6 +8853,7 @@ true true true + true true true true @@ -8383,6 +8879,7 @@ true true true + true true true true @@ -8392,6 +8889,7 @@ true true true + true true true true @@ -8417,6 +8915,7 @@ true true true + true true true true @@ -8426,6 +8925,7 @@ true true true + true true true true @@ -8451,6 +8951,7 @@ true true true + true true true true @@ -8460,6 +8961,7 @@ true true true + true true true true @@ -8485,6 +8987,7 @@ true true true + true true true true @@ -8494,6 +8997,7 @@ true true true + true true true true @@ -8513,9 +9017,11 @@ true true true + true true true true + true true true true @@ -8543,9 +9049,11 @@ true true true + true true true true + true true true true @@ -8579,6 +9087,7 @@ true true true + true true true true @@ -8588,6 +9097,7 @@ true true true + true true true true @@ -8613,6 +9123,7 @@ true true true + true true true true @@ -8622,6 +9133,7 @@ true true true + true true true true @@ -8647,6 +9159,7 @@ true true true + true true true true @@ -8656,6 +9169,7 @@ true true true + true true true true @@ -8675,9 +9189,11 @@ true true true + true true true true + true true true true @@ -8711,6 +9227,7 @@ true true true + true true true true @@ -8720,6 +9237,7 @@ true true true + true true true true @@ -8745,6 +9263,7 @@ true true true + true true true true @@ -8754,6 +9273,7 @@ true true true + true true true true @@ -8779,6 +9299,7 @@ true true true + true true true true @@ -8788,6 +9309,7 @@ true true true + true true true true @@ -8813,6 +9335,7 @@ true true true + true true true true @@ -8822,6 +9345,7 @@ true true true + true true true true @@ -8847,6 +9371,7 @@ true true true + true true true true @@ -8856,6 +9381,7 @@ true true true + true true true true @@ -8881,6 +9407,7 @@ true true true + true true true true @@ -8890,6 +9417,7 @@ true true true + true true true true @@ -8915,6 +9443,7 @@ true true true + true true true true @@ -8924,6 +9453,7 @@ true true true + true true true true @@ -8949,6 +9479,7 @@ true true true + true true true true @@ -8958,6 +9489,7 @@ true true true + true true true true @@ -8983,6 +9515,7 @@ true true true + true true true true @@ -8992,6 +9525,7 @@ true true true + true true true true @@ -9017,6 +9551,7 @@ true true true + true true true true @@ -9026,6 +9561,7 @@ true true true + true true true true @@ -9051,6 +9587,7 @@ true true true + true true true true @@ -9060,6 +9597,7 @@ true true true + true true true true @@ -9085,6 +9623,7 @@ true true true + true true true true @@ -9094,6 +9633,7 @@ true true true + true true true true @@ -9119,6 +9659,7 @@ true true true + true true true true @@ -9128,6 +9669,7 @@ true true true + true true true true @@ -9153,6 +9695,7 @@ true true true + true true true true @@ -9162,6 +9705,7 @@ true true true + true true true true @@ -9187,6 +9731,7 @@ true true true + true true true true @@ -9196,6 +9741,7 @@ true true true + true true true true @@ -9221,6 +9767,7 @@ true true true + true true true true @@ -9230,6 +9777,7 @@ true true true + true true true true @@ -9255,6 +9803,7 @@ true true true + true true true true @@ -9264,6 +9813,7 @@ true true true + true true true true @@ -9289,6 +9839,7 @@ true true true + true true true true @@ -9298,6 +9849,7 @@ true true true + true true true true @@ -9323,6 +9875,7 @@ true true true + true true true true @@ -9332,6 +9885,7 @@ true true true + true true true true @@ -9357,6 +9911,7 @@ true true true + true true true true @@ -9366,6 +9921,7 @@ true true true + true true true true @@ -9391,6 +9947,7 @@ true true true + true true true true @@ -9400,6 +9957,7 @@ true true true + true true true true @@ -9425,6 +9983,7 @@ true true true + true true true true @@ -9434,6 +9993,7 @@ true true true + true true true true @@ -9459,6 +10019,7 @@ true true true + true true true true @@ -9468,6 +10029,7 @@ true true true + true true true true @@ -9493,6 +10055,7 @@ true true true + true true true true @@ -9502,6 +10065,7 @@ true true true + true true true true @@ -9527,6 +10091,7 @@ true true true + true true true true @@ -9536,6 +10101,7 @@ true true true + true true true true @@ -9561,6 +10127,7 @@ true true true + true true true true @@ -9570,6 +10137,7 @@ true true true + true true true true @@ -9595,6 +10163,7 @@ true true true + true true true true @@ -9604,6 +10173,7 @@ true true true + true true true true @@ -9629,6 +10199,7 @@ true true true + true true true true @@ -9638,6 +10209,7 @@ true true true + true true true true @@ -9663,6 +10235,7 @@ true true true + true true true true @@ -9672,6 +10245,7 @@ true true true + true true true true @@ -9697,6 +10271,7 @@ true true true + true true true true @@ -9706,6 +10281,7 @@ true true true + true true true true @@ -9731,6 +10307,7 @@ true true true + true true true true @@ -9740,6 +10317,7 @@ true true true + true true true true @@ -9765,6 +10343,7 @@ true true true + true true true true @@ -9774,6 +10353,7 @@ true true true + true true true true @@ -9799,6 +10379,7 @@ true true true + true true true true @@ -9808,6 +10389,7 @@ true true true + true true true true @@ -9833,6 +10415,7 @@ true true true + true true true true @@ -9842,6 +10425,7 @@ true true true + true true true true @@ -9867,6 +10451,7 @@ true true true + true true true true @@ -9876,6 +10461,7 @@ true true true + true true true true @@ -9901,6 +10487,7 @@ true true true + true true true true @@ -9910,6 +10497,7 @@ true true true + true true true true @@ -9935,6 +10523,7 @@ true true true + true true true true @@ -9944,6 +10533,7 @@ true true true + true true true true @@ -9969,6 +10559,7 @@ true true true + true true true true @@ -9978,6 +10569,7 @@ true true true + true true true true @@ -10003,6 +10595,7 @@ true true true + true true true true @@ -10012,6 +10605,7 @@ true true true + true true true true @@ -10031,8 +10625,10 @@ true true true + true true true + true true true true @@ -10067,6 +10663,7 @@ true true true + true true true true @@ -10076,6 +10673,7 @@ true true true + true true true true @@ -10101,6 +10699,7 @@ true true true + true true true true @@ -10110,6 +10709,7 @@ true true true + true true true true @@ -10135,6 +10735,7 @@ true true true + true true true true @@ -10144,6 +10745,7 @@ true true true + true true true true @@ -10169,6 +10771,7 @@ true true true + true true true true @@ -10178,6 +10781,7 @@ true true true + true true true true @@ -10203,6 +10807,7 @@ true true true + true true true true @@ -10212,6 +10817,7 @@ true true true + true true true true @@ -10237,6 +10843,7 @@ true true true + true true true true @@ -10246,6 +10853,7 @@ true true true + true true true true @@ -10271,6 +10879,7 @@ true true true + true true true true @@ -10280,6 +10889,7 @@ true true true + true true true true @@ -10305,6 +10915,7 @@ true true true + true true true true @@ -10314,6 +10925,7 @@ true true true + true true true true @@ -10339,6 +10951,7 @@ true true true + true true true true @@ -10348,6 +10961,7 @@ true true true + true true true true @@ -10373,6 +10987,7 @@ true true true + true true true true @@ -10382,6 +10997,7 @@ true true true + true true true true @@ -10407,6 +11023,7 @@ true true true + true true true true @@ -10416,6 +11033,7 @@ true true true + true true true true @@ -10441,6 +11059,7 @@ true true true + true true true true @@ -10450,6 +11069,7 @@ true true true + true true true true @@ -10475,6 +11095,7 @@ true true true + true true true true @@ -10484,6 +11105,7 @@ true true true + true true true true @@ -10509,6 +11131,7 @@ true true true + true true true true @@ -10518,6 +11141,7 @@ true true true + true true true true @@ -10543,6 +11167,7 @@ true true true + true true true true @@ -10552,6 +11177,7 @@ true true true + true true true true @@ -10569,8 +11195,10 @@ true true true + true true true + true true true true @@ -10606,6 +11234,7 @@ true true true + true true true true @@ -10615,6 +11244,7 @@ true true true + true true true true @@ -10640,6 +11270,7 @@ true true true + true true true true @@ -10649,6 +11280,7 @@ true true true + true true true true @@ -10674,6 +11306,7 @@ true true true + true true true true @@ -10683,6 +11316,7 @@ true true true + true true true true @@ -10708,6 +11342,7 @@ true true true + true true true true @@ -10717,6 +11352,7 @@ true true true + true true true true @@ -10742,6 +11378,7 @@ true true true + true true true true @@ -10751,6 +11388,7 @@ true true true + true true true true @@ -10776,6 +11414,7 @@ true true true + true true true true @@ -10785,6 +11424,7 @@ true true true + true true true true @@ -10810,6 +11450,7 @@ true true true + true true true true @@ -10819,6 +11460,7 @@ true true true + true true true true @@ -10844,6 +11486,7 @@ true true true + true true true true @@ -10853,6 +11496,7 @@ true true true + true true true true @@ -10878,6 +11522,7 @@ true true true + true true true true @@ -10887,6 +11532,7 @@ true true true + true true true true @@ -10912,6 +11558,7 @@ true true true + true true true true @@ -10921,6 +11568,7 @@ true true true + true true true true @@ -10946,6 +11594,7 @@ true true true + true true true true @@ -10955,6 +11604,7 @@ true true true + true true true true @@ -10980,6 +11630,7 @@ true true true + true true true true @@ -10989,6 +11640,7 @@ true true true + true true true true @@ -11014,6 +11666,7 @@ true true true + true true true true @@ -11023,6 +11676,7 @@ true true true + true true true true @@ -11048,6 +11702,7 @@ true true true + true true true true @@ -11057,6 +11712,7 @@ true true true + true true true true @@ -11077,7 +11733,9 @@ true true true + true true + true true true true @@ -11112,6 +11770,7 @@ true true true + true true true true @@ -11121,6 +11780,7 @@ true true true + true true true true @@ -11146,6 +11806,7 @@ true true true + true true true true @@ -11155,6 +11816,7 @@ true true true + true true true true @@ -11180,6 +11842,7 @@ true true true + true true true true @@ -11189,6 +11852,7 @@ true true true + true true true true @@ -11214,6 +11878,7 @@ true true true + true true true true @@ -11223,6 +11888,7 @@ true true true + true true true true @@ -11248,6 +11914,7 @@ true true true + true true true true @@ -11257,6 +11924,7 @@ true true true + true true true true @@ -11282,6 +11950,7 @@ true true true + true true true true @@ -11291,6 +11960,7 @@ true true true + true true true true @@ -11316,6 +11986,7 @@ true true true + true true true true @@ -11325,6 +11996,7 @@ true true true + true true true true @@ -11350,6 +12022,7 @@ true true true + true true true true @@ -11359,6 +12032,7 @@ true true true + true true true true @@ -11384,6 +12058,7 @@ true true true + true true true true @@ -11393,6 +12068,7 @@ true true true + true true true true @@ -11418,6 +12094,7 @@ true true true + true true true true @@ -11427,6 +12104,7 @@ true true true + true true true true @@ -11452,6 +12130,7 @@ true true true + true true true true @@ -11461,6 +12140,7 @@ true true true + true true true true @@ -11486,6 +12166,7 @@ true true true + true true true true @@ -11495,6 +12176,7 @@ true true true + true true true true @@ -11520,6 +12202,7 @@ true true true + true true true true @@ -11529,6 +12212,7 @@ true true true + true true true true @@ -11554,6 +12238,7 @@ true true true + true true true true @@ -11563,6 +12248,7 @@ true true true + true true true true @@ -11588,6 +12274,7 @@ true true true + true true true true @@ -11597,6 +12284,7 @@ true true true + true true true true @@ -11622,6 +12310,7 @@ true true true + true true true true @@ -11631,6 +12320,7 @@ true true true + true true true true @@ -11656,6 +12346,7 @@ true true true + true true true true @@ -11665,6 +12356,7 @@ true true true + true true true true @@ -11690,6 +12382,7 @@ true true true + true true true true @@ -11699,6 +12392,7 @@ true true true + true true true true @@ -11736,7 +12430,6 @@ - @@ -11851,6 +12544,7 @@ false false false + false false false false @@ -11860,8 +12554,10 @@ false false false + false false false + false false false false @@ -11881,6 +12577,7 @@ false false false + false false false false @@ -11890,8 +12587,10 @@ false false false + false false false + false false false false @@ -11930,6 +12629,7 @@ false false false + false false false false @@ -11939,8 +12639,10 @@ false false false + false false false + false false false false @@ -11960,6 +12662,7 @@ false false false + false false false false @@ -11969,8 +12672,10 @@ false false false + false false false + false false false false @@ -12004,6 +12709,7 @@ false false false + false false false false @@ -12013,8 +12719,10 @@ false false false + false false false + false false false false @@ -12034,6 +12742,7 @@ false false false + false false false false @@ -12043,8 +12752,10 @@ false false false + false false false + false false false false @@ -12068,6 +12779,7 @@ false false false + false false false false @@ -12077,8 +12789,10 @@ false false false + false false false + false false false false @@ -12098,6 +12812,7 @@ false false false + false false false false @@ -12107,8 +12822,10 @@ false false false + false false false + false false false false @@ -12132,6 +12849,7 @@ false false false + false false false false @@ -12141,8 +12859,10 @@ false false false + false false false + false false false false @@ -12162,6 +12882,7 @@ false false false + false false false false @@ -12171,8 +12892,10 @@ false false false + false false false + false false false false @@ -12196,6 +12919,7 @@ false false false + false false false false @@ -12205,8 +12929,10 @@ false false false + false false false + false false false false @@ -12226,6 +12952,7 @@ false false false + false false false false @@ -12235,8 +12962,10 @@ false false false + false false false + false false false false @@ -12260,6 +12989,7 @@ false false false + false false false false @@ -12269,8 +12999,10 @@ false false false + false false false + false false false false @@ -12290,6 +13022,7 @@ false false false + false false false false @@ -12299,8 +13032,10 @@ false false false + false false false + false false false false @@ -12329,6 +13064,7 @@ false false false + false false false false @@ -12338,8 +13074,10 @@ false false false + false false false + false false false false @@ -12359,6 +13097,7 @@ false false false + false false false false @@ -12368,8 +13107,10 @@ false false false + false false false + false false false false @@ -12397,6 +13138,7 @@ false false false + false false false false @@ -12406,8 +13148,10 @@ false false false + false false false + false false false false @@ -12427,6 +13171,7 @@ false false false + false false false false @@ -12436,8 +13181,10 @@ false false false + false false false + false false false false @@ -12474,6 +13221,7 @@ false false false + false false false false @@ -12483,8 +13231,10 @@ false false false + false false false + false false false false @@ -12504,6 +13254,7 @@ false false false + false false false false @@ -12513,8 +13264,10 @@ false false false + false false false + false false false false @@ -12699,9 +13452,10 @@ - - - + + + + @@ -12715,8 +13469,10 @@ true true true + true true true + true true true true @@ -12744,8 +13500,10 @@ true true true + true true true + true true true true @@ -12773,9 +13531,11 @@ true true true + true true true true + true true true true @@ -12802,8 +13562,10 @@ true true true + true true true + true true true true diff --git a/test/vs2022/etl.vcxproj.filters b/test/vs2022/etl.vcxproj.filters index 6358b1e7..bc844b79 100644 --- a/test/vs2022/etl.vcxproj.filters +++ b/test/vs2022/etl.vcxproj.filters @@ -2213,9 +2213,6 @@ Tests\Misc - - Tests\Misc - Tests\Misc @@ -3526,9 +3523,12 @@ Tests\Scripts - + Resource Files\CI\Github + + Tests\Scripts +