From b5bb408148ca37b8f23d6bafc94199f5663cdae6 Mon Sep 17 00:00:00 2001 From: Bo Rydberg <2945606+bolry@users.noreply.github.com> Date: Tue, 9 Mar 2021 11:48:11 +0100 Subject: [PATCH] Partial fix to compiling with C++98/03 (#342) --- include/etl/flags.h | 1 + include/etl/null_type.h | 2 ++ include/etl/queue_spsc_locked.h | 8 ++++---- include/etl/ratio.h | 3 +++ include/etl/reference_counted_message.h | 2 ++ include/etl/string_utilities.h | 2 ++ 6 files changed, 14 insertions(+), 4 deletions(-) diff --git a/include/etl/flags.h b/include/etl/flags.h index 5c12874a..937342ef 100644 --- a/include/etl/flags.h +++ b/include/etl/flags.h @@ -36,6 +36,7 @@ SOFTWARE. #include #include "platform.h" +#include "algorithm.h" #include "type_traits.h" #include "integral_limits.h" #include "static_assert.h" diff --git a/include/etl/null_type.h b/include/etl/null_type.h index 3dd8b096..95a28cc2 100644 --- a/include/etl/null_type.h +++ b/include/etl/null_type.h @@ -29,6 +29,8 @@ SOFTWARE. #ifndef ETL_NULL_TYPE_INCLUDED #define ETL_NULL_TYPE_INCLUDED +#include + #undef ETL_FILE #define ETL_FILE "50" diff --git a/include/etl/queue_spsc_locked.h b/include/etl/queue_spsc_locked.h index 42a43212..5f392946 100644 --- a/include/etl/queue_spsc_locked.h +++ b/include/etl/queue_spsc_locked.h @@ -290,7 +290,7 @@ namespace etl template bool emplace_from_unlocked(const T1& value1) { - return emplace_implementation(valie1); + return emplace_implementation(value1); } //************************************************************************* @@ -300,7 +300,7 @@ namespace etl template bool emplace_from_unlocked(const T1& value1, const T2& value2) { - return emplace_implementation(valie1, value2); + return emplace_implementation(value1, value2); } //************************************************************************* @@ -310,7 +310,7 @@ namespace etl template bool emplace_from_unlocked(const T1& value1, const T2& value2, const T3& value3) { - return emplace_implementation(valie1, value2, value3); + return emplace_implementation(value1, value2, value3); } //************************************************************************* @@ -320,7 +320,7 @@ namespace etl template bool emplace_from_unlocked(const T1& value1, const T2& value2, const T3& value3, const T4& value4) { - return emplace_implementation(valie1, value2, value3, value4); + return emplace_implementation(value1, value2, value3, value4); } //************************************************************************* diff --git a/include/etl/ratio.h b/include/etl/ratio.h index cc80b760..67689c1f 100644 --- a/include/etl/ratio.h +++ b/include/etl/ratio.h @@ -31,8 +31,11 @@ SOFTWARE. #ifndef ETL_RATIO_INCLUDED #define ETL_RATIO_INCLUDED +#include #include +#include "platform.h" + ///\defgroup ratio ratio ///\ingroup maths diff --git a/include/etl/reference_counted_message.h b/include/etl/reference_counted_message.h index 409f9867..4ff31521 100644 --- a/include/etl/reference_counted_message.h +++ b/include/etl/reference_counted_message.h @@ -35,6 +35,8 @@ SOFTWARE. #include "message.h" #include "atomic.h" #include "reference_counted_object.h" +#include "static_assert.h" +#include "type_traits.h" #include "ireference_counted_message_pool.h" namespace etl diff --git a/include/etl/string_utilities.h b/include/etl/string_utilities.h index b1371fef..2636a340 100644 --- a/include/etl/string_utilities.h +++ b/include/etl/string_utilities.h @@ -83,6 +83,7 @@ namespace etl } }; +#if ETL_CPP11_SUPPORTED template <> struct whitespace { @@ -100,6 +101,7 @@ namespace etl return U" \t\n\r\f\v"; } }; +#endif #if ETL_CPP17_SUPPORTED template