Merge remote-tracking branch 'origin/feature/etl__make_string' into development

# Conflicts:
#	include/etl/version.h
#	library.json
#	library.properties
#	support/Release notes.txt
This commit is contained in:
John Wellbelove 2019-12-04 20:55:18 +00:00
parent 84cfab6b32
commit 727596b6ed
11 changed files with 50 additions and 5 deletions

View File

@ -251,6 +251,15 @@ namespace etl
}
};
#endif
//***************************************************************************
/// Make string from string literal or char array
//***************************************************************************
template<const size_t MAX_SIZE>
etl::string<MAX_SIZE - 1> make_string(const char (&text) [MAX_SIZE])
{
return etl::string<MAX_SIZE - 1>(text);
}
}
#include "private/minmax_pop.h"

View File

@ -251,6 +251,15 @@ namespace etl
}
};
#endif
//***************************************************************************
/// Make u16string from UTF-8 string literal or char16_t array
//***************************************************************************
template<const size_t MAX_SIZE>
etl::u16string<MAX_SIZE - 1> make_string(const char16_t (&text) [MAX_SIZE])
{
return etl::u16string<MAX_SIZE - 1>(text);
}
}
#include "private/minmax_pop.h"

View File

@ -251,6 +251,15 @@ namespace etl
}
};
#endif
//***************************************************************************
/// Make u32string from UTF-16 string literal or char32_t array
//***************************************************************************
template<const size_t MAX_SIZE>
etl::u32string<MAX_SIZE - 1> make_string(const char32_t (&text) [MAX_SIZE])
{
return etl::u32string<MAX_SIZE - 1>(text);
}
}
#include "private/minmax_pop.h"

View File

@ -38,7 +38,7 @@ SOFTWARE.
///\ingroup utilities
#define ETL_VERSION_MAJOR 15
#define ETL_VERSION_MINOR 1
#define ETL_VERSION_MINOR 2
#define ETL_VERSION_PATCH 0
#define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) "." ETL_STRINGIFY(ETL_VERSION_MINOR) "." ETL_STRINGIFY(ETL_VERSION_PATCH)

View File

@ -252,6 +252,15 @@ namespace etl
}
};
#endif
//***************************************************************************
/// Make wstring from wide string literal or wchar_t array
//***************************************************************************
template<const size_t MAX_SIZE>
etl::wstring<MAX_SIZE - 1> make_string(const wchar_t (&text) [MAX_SIZE])
{
return etl::wstring<MAX_SIZE - 1>(text);
}
}
#include "private/minmax_pop.h"

View File

@ -1,6 +1,6 @@
{
"name": "Embedded Template Library",
"version": "15.1.0",
"version": "15.2.0",
"authors": {
"name": "John Wellbelove",
"email": "<john.wellbelove@etlcpp.com>"

View File

@ -1,5 +1,5 @@
name=Embedded Template Library
version=15.1.0
version=15.2.0
author= John Wellbelove <john.wellbelove@etlcpp.com>
maintainer=John Wellbelove <john.wellbelove@etlcpp.com>
license=MIT

View File

@ -1,3 +1,8 @@
===============================================================================
15.2.0
Added function adaptors and removed built-in sort functions from indirect_vector.
Added etl::make_string for all string types.
===============================================================================
15.1.0
Fixes to the conditional compilation of choose_tag_types.h and

View File

@ -941,6 +941,7 @@
<ClCompile Include="..\test_indirect_vector.cpp" />
<ClCompile Include="..\test_indirect_vector_external_buffer.cpp" />
<ClCompile Include="..\test_list_shared_pool.cpp" />
<ClCompile Include="..\test_make_string.cpp" />
<ClCompile Include="..\test_multi_array.cpp" />
<ClCompile Include="..\test_no_stl_algorithm.cpp" />
<ClCompile Include="..\test_array.cpp">

View File

@ -1256,6 +1256,9 @@
<ClCompile Include="..\test_indirect_vector_external_buffer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\test_make_string.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\..\library.properties">

View File

@ -1,7 +1,7 @@
List of ideas for future development.
delegate_timer (Variant of callback_timer)
delegate_state_chart (Variant of state_chart)
Finish secure containers
Finish move semantics for all containers