mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
Merge branch 'development' into issue/Add-Hugo-support-for-documentation
# Conflicts: # test/vs2022/etl.vcxproj.filters
This commit is contained in:
commit
129c3091e4
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Embedded Template Library ETL",
|
||||
"version": "20.47.0",
|
||||
"version": "20.47.1",
|
||||
"authors": {
|
||||
"name": "John Wellbelove",
|
||||
"email": "john.wellbelove@etlcpp.com"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
name=Embedded Template Library ETL
|
||||
version=20.47.0
|
||||
version=20.47.1
|
||||
author= John Wellbelove <john.wellbelove@etlcpp.com>
|
||||
maintainer=John Wellbelove <john.wellbelove@etlcpp.com>
|
||||
license=MIT
|
||||
|
||||
@ -43,6 +43,7 @@ SOFTWARE.
|
||||
#include "exception.h"
|
||||
#include "functional.h"
|
||||
#include "gcd.h"
|
||||
#include "initializer_list.h"
|
||||
#include "invoke.h"
|
||||
#include "iterator.h"
|
||||
#include "largest.h"
|
||||
@ -7020,6 +7021,7 @@ namespace etl
|
||||
return etl::invoke(comp, etl::invoke(proj, b), etl::invoke(proj, a)) ? b : a;
|
||||
}
|
||||
|
||||
#if ETL_HAS_INITIALIZER_LIST
|
||||
template <class T, class Comp = ranges::less, class Proj = etl::identity>
|
||||
constexpr T operator()(std::initializer_list<T> r, Comp comp = {}, Proj proj = {}) const
|
||||
{
|
||||
@ -7036,6 +7038,7 @@ namespace etl
|
||||
}
|
||||
return *smallest;
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class R, class Comp = ranges::less, class Proj = etl::identity, typename = etl::enable_if_t<etl::is_range_v<R>>>
|
||||
constexpr ranges::range_value_t<R> operator()(R&& r, Comp comp = {}, Proj proj = {}) const
|
||||
@ -7098,6 +7101,7 @@ namespace etl
|
||||
return etl::invoke(comp, etl::invoke(proj, a), etl::invoke(proj, b)) ? b : a;
|
||||
}
|
||||
|
||||
#if ETL_HAS_INITIALIZER_LIST
|
||||
template <class T, class Comp = ranges::less, class Proj = etl::identity>
|
||||
constexpr T operator()(std::initializer_list<T> r, Comp comp = {}, Proj proj = {}) const
|
||||
{
|
||||
@ -7114,6 +7118,7 @@ namespace etl
|
||||
}
|
||||
return *largest;
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class R, class Comp = ranges::less, class Proj = etl::identity, typename = etl::enable_if_t<etl::is_range_v<R>>>
|
||||
constexpr ranges::range_value_t<R> operator()(R&& r, Comp comp = {}, Proj proj = {}) const
|
||||
@ -7180,6 +7185,7 @@ namespace etl
|
||||
return {a, b};
|
||||
}
|
||||
|
||||
#if ETL_HAS_INITIALIZER_LIST
|
||||
template <class T, class Comp = ranges::less, class Proj = etl::identity>
|
||||
constexpr ranges::minmax_result<T> operator()(std::initializer_list<T> r, Comp comp = {}, Proj proj = {}) const
|
||||
{
|
||||
@ -7202,6 +7208,7 @@ namespace etl
|
||||
}
|
||||
return {*smallest, *largest};
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class R, class Comp = ranges::less, class Proj = etl::identity, typename = etl::enable_if_t<etl::is_range_v<R>>>
|
||||
constexpr ranges::minmax_result<ranges::range_value_t<R>> operator()(R&& r, Comp comp = {}, Proj proj = {}) const
|
||||
|
||||
@ -1218,6 +1218,52 @@ namespace etl
|
||||
|
||||
#define ETL_ARRAY_SIZE(a) sizeof(etl::array_size(a))
|
||||
|
||||
#if ETL_NOT_USING_STL || ETL_CPP17_NOT_SUPPORTED
|
||||
//**************************************************************************
|
||||
/// Returns a pointer to the block of memory containing the elements of the
|
||||
/// range.
|
||||
///\ingroup container
|
||||
//**************************************************************************
|
||||
template <typename TContainer>
|
||||
ETL_CONSTEXPR typename TContainer::pointer data(TContainer& container)
|
||||
{
|
||||
return container.data();
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
/// Returns a const_pointer to the block of memory containing the elements of
|
||||
/// the range.
|
||||
///\ingroup container
|
||||
//**************************************************************************
|
||||
template <typename TContainer>
|
||||
ETL_CONSTEXPR typename TContainer::const_pointer data(const TContainer& container)
|
||||
{
|
||||
return container.data();
|
||||
}
|
||||
|
||||
///**************************************************************************
|
||||
/// Returns a pointer to the block of memory containing the elements of the
|
||||
/// range.
|
||||
///\ingroup container
|
||||
///**************************************************************************
|
||||
template <typename TValue, size_t Array_Size>
|
||||
ETL_CONSTEXPR TValue* data(TValue (&a)[Array_Size])
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
||||
///**************************************************************************
|
||||
/// Returns a const pointer to the block of memory containing the elements of
|
||||
/// the range.
|
||||
///\ingroup container
|
||||
///**************************************************************************
|
||||
template <typename TValue, size_t Array_Size>
|
||||
ETL_CONSTEXPR const TValue* data(const TValue (&a)[Array_Size])
|
||||
{
|
||||
return a;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_USING_CPP17
|
||||
template <class T>
|
||||
using iter_value_t = typename etl::iterator_traits<etl::remove_cvref_t<T>>::value_type;
|
||||
@ -1962,52 +2008,6 @@ namespace etl
|
||||
inline constexpr bool is_range_v = is_range<T>::value;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ETL_NOT_USING_STL || ETL_CPP17_NOT_SUPPORTED
|
||||
//**************************************************************************
|
||||
/// Returns a pointer to the block of memory containing the elements of the
|
||||
/// range.
|
||||
///\ingroup container
|
||||
//**************************************************************************
|
||||
template <typename TContainer>
|
||||
ETL_CONSTEXPR typename TContainer::pointer data(TContainer& container)
|
||||
{
|
||||
return container.data();
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
/// Returns a const_pointer to the block of memory containing the elements of
|
||||
/// the range.
|
||||
///\ingroup container
|
||||
//**************************************************************************
|
||||
template <typename TContainer>
|
||||
ETL_CONSTEXPR typename TContainer::const_pointer data(const TContainer& container)
|
||||
{
|
||||
return container.data();
|
||||
}
|
||||
|
||||
///**************************************************************************
|
||||
/// Returns a pointer to the block of memory containing the elements of the
|
||||
/// range.
|
||||
///\ingroup container
|
||||
///**************************************************************************
|
||||
template <typename TValue, size_t Array_Size>
|
||||
ETL_CONSTEXPR TValue* data(TValue (&a)[Array_Size])
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
||||
///**************************************************************************
|
||||
/// Returns a const pointer to the block of memory containing the elements of
|
||||
/// the range.
|
||||
///\ingroup container
|
||||
///**************************************************************************
|
||||
template <typename TValue, size_t Array_Size>
|
||||
ETL_CONSTEXPR const TValue* data(const TValue (&a)[Array_Size])
|
||||
{
|
||||
return a;
|
||||
}
|
||||
#endif
|
||||
} // namespace etl
|
||||
|
||||
#endif
|
||||
|
||||
@ -40,7 +40,7 @@ SOFTWARE.
|
||||
|
||||
#define ETL_VERSION_MAJOR 20
|
||||
#define ETL_VERSION_MINOR 47
|
||||
#define ETL_VERSION_PATCH 0
|
||||
#define ETL_VERSION_PATCH 1
|
||||
|
||||
#define ETL_VERSION \
|
||||
ETL_STRING(ETL_VERSION_MAJOR) \
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Embedded Template Library",
|
||||
"version": "20.47.0",
|
||||
"version": "20.47.1",
|
||||
"authors": {
|
||||
"name": "John Wellbelove",
|
||||
"email": "john.wellbelove@etlcpp.com"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
name=Embedded Template Library
|
||||
version=20.47.0
|
||||
version=20.47.1
|
||||
author= John Wellbelove <john.wellbelove@etlcpp.com>
|
||||
maintainer=John Wellbelove <john.wellbelove@etlcpp.com>
|
||||
license=MIT
|
||||
|
||||
@ -1,4 +1,9 @@
|
||||
===============================================================================
|
||||
20.47.1
|
||||
|
||||
#1374 Fix initializer_list use in algorithm.h and definition of data() in iterator.h
|
||||
|
||||
===============================================================================
|
||||
20.47.0
|
||||
|
||||
#1219 Topic/expected monadic operations
|
||||
|
||||
@ -16495,6 +16495,7 @@ namespace
|
||||
CHECK_EQUAL(3, etl::ranges::min(-5, 3, etl::ranges::less{}, abs_proj));
|
||||
}
|
||||
|
||||
#if ETL_HAS_INITIALIZER_LIST
|
||||
//*************************************************************************
|
||||
TEST(ranges_min_initializer_list)
|
||||
{
|
||||
@ -16517,6 +16518,7 @@ namespace
|
||||
};
|
||||
CHECK_EQUAL(9, etl::ranges::min({3, 1, 4, 5, 9, 2, 6}, etl::ranges::less{}, negate));
|
||||
}
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
TEST(ranges_min_range)
|
||||
@ -16692,6 +16694,7 @@ namespace
|
||||
CHECK_EQUAL(-5, etl::ranges::max(-5, 3, etl::ranges::less{}, abs_proj));
|
||||
}
|
||||
|
||||
#if ETL_HAS_INITIALIZER_LIST
|
||||
//*************************************************************************
|
||||
TEST(ranges_max_initializer_list)
|
||||
{
|
||||
@ -16714,6 +16717,7 @@ namespace
|
||||
};
|
||||
CHECK_EQUAL(1, etl::ranges::max({3, 1, 4, 5, 9, 2, 6}, etl::ranges::less{}, negate));
|
||||
}
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
TEST(ranges_max_range)
|
||||
@ -16914,6 +16918,7 @@ namespace
|
||||
CHECK_EQUAL(-5, result2.max);
|
||||
}
|
||||
|
||||
#if ETL_HAS_INITIALIZER_LIST
|
||||
//*************************************************************************
|
||||
TEST(ranges_minmax_initializer_list)
|
||||
{
|
||||
@ -16945,6 +16950,7 @@ namespace
|
||||
CHECK_EQUAL(9, result.min);
|
||||
CHECK_EQUAL(1, result.max);
|
||||
}
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
TEST(ranges_minmax_range)
|
||||
|
||||
@ -11528,6 +11528,7 @@
|
||||
<None Include="..\list_test_files.ps1" />
|
||||
<None Include="..\list_test_files.sh" />
|
||||
<None Include="..\meson.build" />
|
||||
<None Include="..\run-coverage.sh" />
|
||||
<None Include="..\run-syntax-checks.sh" />
|
||||
<None Include="..\run-tests.sh" />
|
||||
<None Include="cpp.hint" />
|
||||
|
||||
@ -3801,7 +3801,7 @@
|
||||
<Filter>Tests\Callbacks & Delegates</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\test_print.cpp">
|
||||
<Filter>Tests</Filter>
|
||||
<Filter>Tests\Strings</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@ -3988,6 +3988,11 @@
|
||||
<None Include="..\..\docs\custom.css">
|
||||
<Filter>Documentation</Filter>
|
||||
</None>
|
||||
<None Include="..\..\.github\workflows\clang-format.yaml" />
|
||||
<None Include="..\..\.github\workflows\clang-format_update.yaml" />
|
||||
<None Include="..\run-coverage.sh">
|
||||
<Filter>Tests\Scripts</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\..\support\Release notes.txt">
|
||||
|
||||
@ -1 +1 @@
|
||||
20.47.0
|
||||
20.47.1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user