diff --git a/include/etl/cstring.h b/include/etl/cstring.h index 0ddfc80a..567561e9 100644 --- a/include/etl/cstring.h +++ b/include/etl/cstring.h @@ -35,7 +35,7 @@ SOFTWARE. #include "basic_string.h" #include "hash.h" -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) #include #endif @@ -141,7 +141,7 @@ namespace etl this->assign(first, last); } -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) //************************************************************************* /// Construct from initializer_list. //************************************************************************* diff --git a/include/etl/deque.h b/include/etl/deque.h index da898328..ccccff02 100644 --- a/include/etl/deque.h +++ b/include/etl/deque.h @@ -48,7 +48,7 @@ SOFTWARE. #include "type_traits.h" #include "parameter_type.h" -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) #include #endif @@ -2066,7 +2066,7 @@ namespace etl this->assign(n, value); } -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) //************************************************************************* /// Construct from initializer_list. //************************************************************************* diff --git a/include/etl/flat_map.h b/include/etl/flat_map.h index 2c7e2f99..d12f1f0e 100644 --- a/include/etl/flat_map.h +++ b/include/etl/flat_map.h @@ -35,7 +35,7 @@ SOFTWARE. #include "reference_flat_map.h" #include "pool.h" -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) #include #endif @@ -854,7 +854,7 @@ namespace etl this->assign(first, last); } -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) //************************************************************************* /// Construct from initializer_list. //************************************************************************* diff --git a/include/etl/flat_multimap.h b/include/etl/flat_multimap.h index 210664ff..1545eeea 100644 --- a/include/etl/flat_multimap.h +++ b/include/etl/flat_multimap.h @@ -35,7 +35,7 @@ SOFTWARE. #include "reference_flat_multimap.h" #include "pool.h" -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) #include #endif @@ -735,7 +735,7 @@ namespace etl this->assign(first, last); } -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) //************************************************************************* /// Construct from initializer_list. //************************************************************************* diff --git a/include/etl/flat_multiset.h b/include/etl/flat_multiset.h index 442f2f99..5858c211 100644 --- a/include/etl/flat_multiset.h +++ b/include/etl/flat_multiset.h @@ -35,7 +35,7 @@ SOFTWARE. #include "reference_flat_multiset.h" #include "pool.h" -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) #include #endif @@ -694,7 +694,7 @@ namespace etl this->assign(first, last); } -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) //************************************************************************* /// Construct from initializer_list. //************************************************************************* diff --git a/include/etl/flat_set.h b/include/etl/flat_set.h index fe7590d6..ab6a4cd2 100644 --- a/include/etl/flat_set.h +++ b/include/etl/flat_set.h @@ -35,7 +35,7 @@ SOFTWARE. #include "reference_flat_set.h" #include "pool.h" -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) #include #endif @@ -760,7 +760,7 @@ namespace etl this->assign(first, last); } -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) //************************************************************************* /// Construct from initializer_list. //************************************************************************* diff --git a/include/etl/forward_list.h b/include/etl/forward_list.h index 407380d3..619547a1 100644 --- a/include/etl/forward_list.h +++ b/include/etl/forward_list.h @@ -46,7 +46,7 @@ SOFTWARE. #include "type_traits.h" #include "parameter_type.h" -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) #include #endif @@ -1415,7 +1415,7 @@ namespace etl this->assign(first, last); } -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) //************************************************************************* /// Construct from initializer_list. //************************************************************************* diff --git a/include/etl/list.h b/include/etl/list.h index d48a6f5d..242ac520 100644 --- a/include/etl/list.h +++ b/include/etl/list.h @@ -47,7 +47,7 @@ SOFTWARE. #include "parameter_type.h" #include "algorithm.h" -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) #include #endif @@ -1655,7 +1655,7 @@ namespace etl this->assign(first, last); } -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) //************************************************************************* /// Construct from initializer_list. //************************************************************************* diff --git a/include/etl/map.h b/include/etl/map.h index 4e7476fb..b04ffc87 100644 --- a/include/etl/map.h +++ b/include/etl/map.h @@ -47,7 +47,7 @@ SOFTWARE. #include "type_traits.h" #include "parameter_type.h" -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) #include #endif @@ -2063,7 +2063,7 @@ namespace etl this->assign(first, last); } -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) //************************************************************************* /// Constructor, from an initializer_list. //************************************************************************* diff --git a/include/etl/multimap.h b/include/etl/multimap.h index e08e65dd..6be6b681 100644 --- a/include/etl/multimap.h +++ b/include/etl/multimap.h @@ -46,7 +46,7 @@ SOFTWARE. #include "type_traits.h" #include "parameter_type.h" -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) #include #endif @@ -1948,7 +1948,7 @@ namespace etl this->assign(first, last); } -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) //************************************************************************* /// Constructor, from an initializer_list. //************************************************************************* diff --git a/include/etl/multiset.h b/include/etl/multiset.h index 47673ee5..e0be09db 100644 --- a/include/etl/multiset.h +++ b/include/etl/multiset.h @@ -46,7 +46,7 @@ SOFTWARE. #include "nullptr.h" #include "type_traits.h" -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) #include #endif @@ -1928,7 +1928,7 @@ namespace etl this->assign(first, last); } -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) //************************************************************************* /// Constructor, from an initializer_list. //************************************************************************* diff --git a/include/etl/nullptr.h b/include/etl/nullptr.h index 07de981b..641b6338 100644 --- a/include/etl/nullptr.h +++ b/include/etl/nullptr.h @@ -72,14 +72,18 @@ namespace std /// A null pointer. ///\ingroup nullptr //***************************************************************************** - const nullptr_t nullptr = {}; + #if !defined(ETL_STLPORT) + const nullptr_t nullptr = { }; + #endif } //***************************************************************************** /// A null pointer. ///\ingroup nullptr //***************************************************************************** +#if !defined(ETL_STLPORT) const std::nullptr_t nullptr = {}; +#endif #else #include diff --git a/include/etl/profiles/segger_gcc_stlport.h b/include/etl/profiles/segger_gcc_stlport.h new file mode 100644 index 00000000..095f4601 --- /dev/null +++ b/include/etl/profiles/segger_gcc_stlport.h @@ -0,0 +1,57 @@ +///\file + +/****************************************************************************** +The MIT License(MIT) + +Embedded Template Library. +https://github.com/ETLCPP/etl +https://www.etlcpp.com + +Copyright(c) 2017 jwellbelove + +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. +******************************************************************************/ + +#ifndef ETL_GCC_INCLUDED +#define ETL_GCC_INCLUDED + +//***************************************************************************** +// GCC +//***************************************************************************** + +#include + +#define ETL_TARGET_DEVICE_GENERIC +#define ETL_TARGET_OS_NONE +#define ETL_COMPILER_GCC +#ifdef __cplusplus + #define ETL_CPP11_SUPPORTED (__cplusplus >= 201103L) + #define ETL_CPP14_SUPPORTED (__cplusplus >= 201402L) + #define ETL_CPP17_SUPPORTED 0 +#else + #define ETL_CPP11_SUPPORTED 0 + #define ETL_CPP14_SUPPORTED 0 + #define ETL_CPP17_SUPPORTED 0 +#endif +#define ETL_NO_NULLPTR_SUPPORT 1 +#define ETL_NO_LARGE_CHAR_SUPPORT !ETL_CPP11_SUPPORTED +#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0 +#define ETL_STLPORT 1 + +#endif diff --git a/include/etl/ratio.h b/include/etl/ratio.h index c0f03436..dfc94e86 100644 --- a/include/etl/ratio.h +++ b/include/etl/ratio.h @@ -28,13 +28,13 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************************/ -#ifndef __ETL_RATIO__ -#define __ETL_RATIO__ +#ifndef ETL_RATIO_INCLUDED +#define ETL_RATIO_INCLUDED #include ///\defgroup ratio ratio -///\ingroup utilities +///\ingroup maths namespace etl { @@ -48,8 +48,8 @@ namespace etl #if INT_MAX > INT32_MAX typedef ratio<1, 1000000000000000000000000> yocto; typedef ratio<1, 1000000000000000000000> zepto; - typedef ratio<1, 1000000000000000000> atto - typedef ratio<1, 1000000000000000> femto + typedef ratio<1, 1000000000000000000> atto; + typedef ratio<1, 1000000000000000> femto; typedef ratio<1, 1000000000000> pico; #endif @@ -63,8 +63,8 @@ namespace etl typedef ratio<1, 100> centi; typedef ratio<1, 10> deci; typedef ratio<10, 1> deca; - typedef ratio<100, 1> hecto - typedef ratio<1000, 1> kilo + typedef ratio<100, 1> hecto; + typedef ratio<1000, 1> kilo; #endif #if (INT_MAX >= INT32_MAX) diff --git a/include/etl/set.h b/include/etl/set.h index e405de30..59283c0c 100644 --- a/include/etl/set.h +++ b/include/etl/set.h @@ -46,7 +46,7 @@ SOFTWARE. #include "type_traits.h" #include "parameter_type.h" -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) #include #endif @@ -1986,7 +1986,7 @@ namespace etl this->assign(first, last); } -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) //************************************************************************* /// Constructor, from an initializer_list. //************************************************************************* diff --git a/include/etl/stack.h b/include/etl/stack.h index 3f9e1612..497390df 100644 --- a/include/etl/stack.h +++ b/include/etl/stack.h @@ -470,7 +470,7 @@ namespace etl //*************************************************************************** ///\ingroup stack /// A fixed capacity stack. - /// This stack does not suppo7rt concurrent access by different threads. + /// This stack does not support concurrent access by different threads. /// \tparam T The type this stack should support. /// \tparam MAX_SIZE The maximum capacity of the stack. //*************************************************************************** diff --git a/include/etl/type_traits.h b/include/etl/type_traits.h index a28a2065..36036944 100644 --- a/include/etl/type_traits.h +++ b/include/etl/type_traits.h @@ -33,7 +33,7 @@ SOFTWARE. #endif //*************************************************************************** -// This file has been auto generated. Do not edit this file. +// THIS FILE HAS BEEN AUTO GENERATED. DO NOT EDIT THIS FILE. //*************************************************************************** //*************************************************************************** @@ -269,14 +269,14 @@ namespace etl /// is_pod /// For C++03, only fundamental and pointers types are recognised. ///\ingroup type_traits -#if (ETL_CPP11_SUPPORTED && !defined(ARDUINO)) && !defined(ETL_IN_UNIT_TEST) +#if (ETL_CPP11_SUPPORTED && !defined(ARDUINO) && !defined(ETL_STLPORT)) && !defined(ETL_IN_UNIT_TEST) // For compilers that support C++11 template struct is_pod : std::is_pod {}; #else template struct is_pod : etl::integral_constant::value || etl::is_pointer::value> {}; #endif -#if (ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED) && !defined(ETL_IN_UNIT_TEST) +#if (ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED) && !defined(ETL_STLPORT) && !defined(ETL_IN_UNIT_TEST) /// is_trivially_constructible ///\ingroup type_traits template struct is_trivially_constructible : std::is_trivially_constructible {}; diff --git a/include/etl/u16string.h b/include/etl/u16string.h index f9c5d22f..e4b8c1af 100644 --- a/include/etl/u16string.h +++ b/include/etl/u16string.h @@ -35,7 +35,7 @@ SOFTWARE. #include "basic_string.h" #include "hash.h" -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) #include #endif @@ -145,7 +145,7 @@ namespace etl this->assign(first, last); } -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) //************************************************************************* /// Construct from initializer_list. //************************************************************************* diff --git a/include/etl/u32string.h b/include/etl/u32string.h index 23554cf4..7a325634 100644 --- a/include/etl/u32string.h +++ b/include/etl/u32string.h @@ -35,7 +35,7 @@ SOFTWARE. #include "basic_string.h" #include "hash.h" -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) #include #endif @@ -145,7 +145,7 @@ namespace etl this->assign(first, last); } -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) //************************************************************************* /// Construct from initializer_list. //************************************************************************* diff --git a/include/etl/vector.h b/include/etl/vector.h index 41683a93..51203597 100644 --- a/include/etl/vector.h +++ b/include/etl/vector.h @@ -53,7 +53,7 @@ SOFTWARE. #include "debug_count.h" #include "private/vector_base.h" -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) #include #endif @@ -1067,7 +1067,7 @@ namespace etl this->assign(first, last); } -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) //************************************************************************* /// Constructor, from an initializer_list. //************************************************************************* @@ -1183,7 +1183,7 @@ namespace etl this->assign(first, last); } -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) //************************************************************************* /// Constructor, from an initializer_list. //************************************************************************* diff --git a/include/etl/version.h b/include/etl/version.h index 9e698aab..015898b2 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -37,9 +37,9 @@ SOFTWARE. /// Definitions of the ETL version ///\ingroup utilities -#define ETL_VERSION "11.9.2" +#define ETL_VERSION "11.11.0" #define ETL_VERSION_MAJOR 11 -#define ETL_VERSION_MINOR 10 +#define ETL_VERSION_MINOR 11 #define ETL_VERSION_PATCH 0 #endif diff --git a/include/etl/wstring.h b/include/etl/wstring.h index d3d6eb65..a4f7bc23 100644 --- a/include/etl/wstring.h +++ b/include/etl/wstring.h @@ -35,7 +35,7 @@ SOFTWARE. #include "basic_string.h" #include "hash.h" -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) #include #endif @@ -146,7 +146,7 @@ namespace etl this->assign(first, last); } -#if ETL_CPP11_SUPPORTED +#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) //************************************************************************* /// Construct from initializer_list. //************************************************************************* diff --git a/support/Release notes.txt b/support/Release notes.txt index 871bb6e7..3501b177 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -1,3 +1,7 @@ +=============================================================================== +11.11.0 +Compatibilty changes for Segger IDE, GCC & STLPort + =============================================================================== 11.10.0 Merged CMake branch diff --git a/test/vs2017/etl.vcxproj b/test/vs2017/etl.vcxproj index 4c47ec11..d866d331 100644 --- a/test/vs2017/etl.vcxproj +++ b/test/vs2017/etl.vcxproj @@ -393,7 +393,9 @@ + + diff --git a/test/vs2017/etl.vcxproj.filters b/test/vs2017/etl.vcxproj.filters index d8a39e36..78786739 100644 --- a/test/vs2017/etl.vcxproj.filters +++ b/test/vs2017/etl.vcxproj.filters @@ -627,6 +627,12 @@ Header Files + + ETL\Maths + + + ETL\Profiles +