diff --git a/examples/ArmTimerCallbacks - C++/.gitignore b/examples/ArmTimerCallbacks - C++/.gitignore new file mode 100644 index 00000000..e7f81c20 --- /dev/null +++ b/examples/ArmTimerCallbacks - C++/.gitignore @@ -0,0 +1,4 @@ +Objects/ +RTE/ +Listings/ +DebugConfig/ diff --git a/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvprojx b/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvprojx index 7b7077f4..ab543f66 100644 --- a/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvprojx +++ b/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvprojx @@ -10,7 +10,7 @@ Target 1 0x4 ARM-ADS - 6130001::V6.13.1::.\ARMCLANG + 5060750::V5.06 update 6 (build 750)::ARMCC 0 @@ -336,7 +336,7 @@ 0 - ETL_NO_STL __STDC_LIMIT_MACROS + __STDC_LIMIT_MACROS ..\..\include;..\ArmTimerCallbacks - C++ diff --git a/examples/ArmTimerCallbacks - C++/etl_profile.h b/examples/ArmTimerCallbacks - C++/etl_profile.h index fe7052fb..dc157287 100644 --- a/examples/ArmTimerCallbacks - C++/etl_profile.h +++ b/examples/ArmTimerCallbacks - C++/etl_profile.h @@ -8,7 +8,7 @@ #define ETL_IVECTOR_REPAIR_ENABLE #define ETL_IDEQUE_REPAIR_ENABLE #define ETL_CALLBACK_TIMER_USE_ATOMIC_LOCK -//#define ETL_NO_STL +#define ETL_NO_STL #include "etl/profiles/auto.h" diff --git a/include/etl/algorithm.h b/include/etl/algorithm.h index da803135..534ef9dc 100644 --- a/include/etl/algorithm.h +++ b/include/etl/algorithm.h @@ -336,7 +336,7 @@ namespace etl TIterator2 move_backward(TIterator1 sb, TIterator1 se, TIterator2 de) { // Move not supported. Defer to copy_backward. - return std::copy_backward(sb, se, de); + return ETL_OR_STD::copy_backward(sb, se, de); } #endif @@ -648,7 +648,13 @@ namespace etl template TIterator fill_n(TIterator first, TSize count, const TValue& value) { - return std::fill_n(first, count, value);; +#if ETL_CPP11_SUPPORTED + return std::fill_n(first, count, value); +#else + std::fill_n(first, count, value); + std::advance(first, count); + return first; +#endif } #endif @@ -929,7 +935,6 @@ namespace etl } #endif -#if defined (ETL_NO_STL) //*************************************************************************** // Heap namespace private_heap @@ -1001,6 +1006,7 @@ namespace etl } } + #if defined (ETL_NO_STL) // Pop Heap template void pop_heap(TIterator first, TIterator last, TCompare compare) @@ -1166,7 +1172,11 @@ namespace etl ETL_NODISCARD bool is_heap(TIterator first, TIterator last, TCompare compare) { +#if ETL_CPP11_SUPPORTED return std::is_heap(first, last, compare); +#else + return private_heap::is_heap(first, last - first, compare()); +#endif } // Is Heap @@ -1174,7 +1184,12 @@ namespace etl ETL_NODISCARD bool is_heap(TIterator first, TIterator last) { +#if ETL_CPP11_SUPPORTED return std::is_heap(first, last); +#else + typedef etl::less::value_type> compare; + return private_heap::is_heap(first, last - first, compare()); +#endif } // Sort Heap diff --git a/include/etl/memory.h b/include/etl/memory.h index 39ea6bbb..f5e39e78 100644 --- a/include/etl/memory.h +++ b/include/etl/memory.h @@ -473,7 +473,7 @@ namespace etl TOutputIterator uninitialized_move(TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin) { // Move not supported. Defer to copy. - return std::uninitialized_copy(i_begin, i_end, o_begin); + return ETL_OR_STD::uninitialized_copy(i_begin, i_end, o_begin); } //***************************************************************************** @@ -488,7 +488,7 @@ namespace etl count += int32_t(etl::distance(i_begin, i_end)); // Move not supported. Defer to copy. - return std::uninitialized_copy(i_begin, i_end, o_begin); + return ETL_OR_STD::uninitialized_copy(i_begin, i_end, o_begin); } #endif @@ -594,11 +594,15 @@ namespace etl /// https://en.cppreference.com/w/cpp/memory/uninitialized_move_n ///\ingroup memory //***************************************************************************** - template + template TOutputIterator uninitialized_move_n(TInputIterator i_begin, TSize n, TOutputIterator o_begin) { // Move not supported. Defer to copy. +#if ETL_CPP11_SUPPORTED return std::uninitialized_copy_n(i_begin, n, o_begin); +#else + return etl::uninitialized_copy_n(i_begin, n, o_begin); +#endif } //***************************************************************************** @@ -607,13 +611,17 @@ namespace etl /// https://en.cppreference.com/w/cpp/memory/uninitialized_move ///\ingroup memory //***************************************************************************** - template + template TOutputIterator uninitialized_move_n(TInputIterator i_begin, TSize n, TOutputIterator o_begin, TCounter& count) { count += TCounter(n); // Move not supported. Defer to copy. +#if ETL_CPP11_SUPPORTED return std::uninitialized_copy_n(i_begin, n, o_begin); +#else + return etl::uninitialized_copy_n(i_begin, n, o_begin); +#endif } #endif diff --git a/include/etl/utility.h b/include/etl/utility.h index c736493b..0883d59b 100644 --- a/include/etl/utility.h +++ b/include/etl/utility.h @@ -35,7 +35,11 @@ SOFTWARE. #include "type_traits.h" #if !defined(ETL_NO_STL) - #include + #if ETL_CPP11_SUPPORTED + #include + #else + #include + #endif #endif ///\defgroup utility utility diff --git a/include/etl/version.h b/include/etl/version.h index 3ed6e899..83d8d60f 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -39,7 +39,7 @@ SOFTWARE. #define ETL_VERSION_MAJOR 16 #define ETL_VERSION_MINOR 7 -#define ETL_VERSION_PATCH 0 +#define ETL_VERSION_PATCH 1 #define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) "." ETL_STRINGIFY(ETL_VERSION_MINOR) "." ETL_STRINGIFY(ETL_VERSION_PATCH) #define ETL_VERSION_W ETL_STRINGIFY(ETL_VERSION_MAJOR) L"." ETL_STRINGIFY(ETL_VERSION_MINOR) L"." ETL_STRINGIFY(ETL_VERSION_PATCH) #define ETL_VERSION_U16 ETL_STRINGIFY(ETL_VERSION_MAJOR) u"." ETL_STRINGIFY(ETL_VERSION_MINOR) u"." ETL_STRINGIFY(ETL_VERSION_PATCH) diff --git a/library.json b/library.json index 15c34a6b..d9f6e5e7 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "Embedded Template Library", - "version": "16.7.0", + "version": "16.7.1", "authors": { "name": "John Wellbelove", "email": "john.wellbelove@etlcpp.com" diff --git a/library.properties b/library.properties index 2a8578d0..f1379e04 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Embedded Template Library -version=16.7.0 +version=16.7.1 author= John Wellbelove maintainer=John Wellbelove license=MIT