mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-28 13:28:43 +08:00
Merge branch 'feature/segger_stlport' into development
This commit is contained in:
commit
207967b8e7
@ -35,7 +35,7 @@ SOFTWARE.
|
||||
#include "basic_string.h"
|
||||
#include "hash.h"
|
||||
|
||||
#if ETL_CPP11_SUPPORTED
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
#include <initializer_list>
|
||||
#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.
|
||||
//*************************************************************************
|
||||
|
||||
@ -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 <initializer_list>
|
||||
#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.
|
||||
//*************************************************************************
|
||||
|
||||
@ -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 <initializer_list>
|
||||
#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.
|
||||
//*************************************************************************
|
||||
|
||||
@ -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 <initializer_list>
|
||||
#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.
|
||||
//*************************************************************************
|
||||
|
||||
@ -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 <initializer_list>
|
||||
#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.
|
||||
//*************************************************************************
|
||||
|
||||
@ -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 <initializer_list>
|
||||
#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.
|
||||
//*************************************************************************
|
||||
|
||||
@ -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 <initializer_list>
|
||||
#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.
|
||||
//*************************************************************************
|
||||
|
||||
@ -47,7 +47,7 @@ SOFTWARE.
|
||||
#include "parameter_type.h"
|
||||
#include "algorithm.h"
|
||||
|
||||
#if ETL_CPP11_SUPPORTED
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
#include <initializer_list>
|
||||
#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.
|
||||
//*************************************************************************
|
||||
|
||||
@ -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 <initializer_list>
|
||||
#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.
|
||||
//*************************************************************************
|
||||
|
||||
@ -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 <initializer_list>
|
||||
#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.
|
||||
//*************************************************************************
|
||||
|
||||
@ -46,7 +46,7 @@ SOFTWARE.
|
||||
#include "nullptr.h"
|
||||
#include "type_traits.h"
|
||||
|
||||
#if ETL_CPP11_SUPPORTED
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
#include <initializer_list>
|
||||
#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.
|
||||
//*************************************************************************
|
||||
|
||||
@ -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 <cstddef>
|
||||
|
||||
57
include/etl/profiles/segger_gcc_stlport.h
Normal file
57
include/etl/profiles/segger_gcc_stlport.h
Normal file
@ -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 <limits.h>
|
||||
|
||||
#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
|
||||
@ -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 <initializer_list>
|
||||
#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.
|
||||
//*************************************************************************
|
||||
|
||||
@ -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 <typename T> struct is_pod : std::is_pod<T> {};
|
||||
#else
|
||||
template <typename T> struct is_pod : etl::integral_constant<bool, etl::is_fundamental<T>::value || etl::is_pointer<T>::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 <typename T> struct is_trivially_constructible : std::is_trivially_constructible<T> {};
|
||||
|
||||
@ -35,7 +35,7 @@ SOFTWARE.
|
||||
#include "basic_string.h"
|
||||
#include "hash.h"
|
||||
|
||||
#if ETL_CPP11_SUPPORTED
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
#include <initializer_list>
|
||||
#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.
|
||||
//*************************************************************************
|
||||
|
||||
@ -35,7 +35,7 @@ SOFTWARE.
|
||||
#include "basic_string.h"
|
||||
#include "hash.h"
|
||||
|
||||
#if ETL_CPP11_SUPPORTED
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
#include <initializer_list>
|
||||
#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.
|
||||
//*************************************************************************
|
||||
|
||||
@ -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 <initializer_list>
|
||||
#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.
|
||||
//*************************************************************************
|
||||
|
||||
@ -37,10 +37,10 @@ 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 9
|
||||
#define ETL_VERSION_PATCH 2
|
||||
#define ETL_VERSION_MINOR 11
|
||||
#define ETL_VERSION_PATCH 0
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ SOFTWARE.
|
||||
#include "basic_string.h"
|
||||
#include "hash.h"
|
||||
|
||||
#if ETL_CPP11_SUPPORTED
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
#include <initializer_list>
|
||||
#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.
|
||||
//*************************************************************************
|
||||
|
||||
@ -1,3 +1,11 @@
|
||||
===============================================================================
|
||||
11.11.0
|
||||
Compatibilty changes for Segger IDE, GCC & STLPort
|
||||
|
||||
===============================================================================
|
||||
11.10.0
|
||||
Merged CMake branch
|
||||
|
||||
===============================================================================
|
||||
11.9.2
|
||||
Fixed compile error when ETL_DEBUG_COUNT is not defined.
|
||||
|
||||
@ -393,6 +393,7 @@
|
||||
<ClInclude Include="..\..\include\etl\profiles\gcc_linux_x86.h" />
|
||||
<ClInclude Include="..\..\include\etl\profiles\gcc_windows_x86.h" />
|
||||
<ClInclude Include="..\..\include\etl\profiles\msvc_x86.h" />
|
||||
<ClInclude Include="..\..\include\etl\profiles\segger_gcc_stlport.h" />
|
||||
<ClInclude Include="..\..\include\etl\profiles\ticc.h" />
|
||||
<ClInclude Include="..\..\include\etl\ratio.h" />
|
||||
<ClInclude Include="..\..\include\etl\scheduler.h" />
|
||||
|
||||
@ -630,6 +630,9 @@
|
||||
<ClInclude Include="..\..\include\etl\ratio.h">
|
||||
<Filter>ETL\Maths</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\etl\profiles\segger_gcc_stlport.h">
|
||||
<Filter>ETL\Profiles</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\main.cpp">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user