Compare commits

..

No commits in common. "master" and "20.47.0" have entirely different histories.

17 changed files with 73 additions and 143 deletions

5
.gitignore vendored
View File

@ -414,8 +414,3 @@ test/vs2022/Debug Clang C++20 - Optimised -O2
include/etl/header_file_list.txt
temp
test/syntax_check/build-make
hugo/public
hugo/resources
hugo/.hugo_build.lock
docs/*.html
test/build-coverage

View File

@ -1,6 +1,6 @@
{
"name": "Embedded Template Library ETL",
"version": "20.47.1",
"version": "20.47.0",
"authors": {
"name": "John Wellbelove",
"email": "john.wellbelove@etlcpp.com"

View File

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

View File

@ -1,15 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ .Title }} | {{ .Site.Title }}</title>
</head>
<body>
<main>
{{ block "main" . }}{{ end }}
</main>
{{ partial "footer.html" . }}
</body>
</html>

View File

@ -1,4 +0,0 @@
<footer style="text-align: center;">
<p>© 2014{{ now.Format "2006" }} {{ .Site.Title }}. All rights reserved.</p>
<p></p>
</footer>

View File

@ -43,7 +43,6 @@ SOFTWARE.
#include "exception.h"
#include "functional.h"
#include "gcd.h"
#include "initializer_list.h"
#include "invoke.h"
#include "iterator.h"
#include "largest.h"
@ -7021,7 +7020,6 @@ 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
{
@ -7038,7 +7036,6 @@ 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
@ -7101,7 +7098,6 @@ 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
{
@ -7118,7 +7114,6 @@ 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
@ -7185,7 +7180,6 @@ 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
{
@ -7208,7 +7202,6 @@ 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

View File

@ -1218,52 +1218,6 @@ 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;
@ -2008,6 +1962,52 @@ 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

View File

@ -735,23 +735,8 @@ namespace etl
inline constexpr private_views::repeat repeat;
} // namespace views
// Non-template base so ADL finds exactly one operator| definition.
class range_adapter_closure_base
{
// Found via ADL on the RHS (any type that derives from
// range_adapter_closure_base). Placing the operator here instead of at
// global/namespace scope avoids conflicts with std::ranges::operator|.
template <class Range, class Closure,
typename = etl::enable_if_t< etl::is_base_of_v<range_adapter_closure_base, etl::decay_t<Closure>>
&& etl::is_invocable_v<etl::decay_t<Closure>, Range>>>
friend auto operator|(Range&& r, Closure&& c)
{
return etl::forward<Closure>(c)(etl::forward<Range>(r));
}
};
template <class Derived>
class range_adapter_closure : public range_adapter_closure_base
template <class Range>
class range_adapter_closure
{
};
@ -947,7 +932,7 @@ namespace etl
{
namespace private_views
{
struct all : public range_adapter_closure_base
struct all
{
template < class Range,
etl::enable_if_t<etl::is_base_of_v< etl::ranges::view_interface<etl::decay_t<Range>>, etl::decay_t<Range>>, int> = 0>
@ -1437,7 +1422,7 @@ namespace etl
{
namespace private_views
{
struct as_rvalue : public range_adapter_closure_base
struct as_rvalue
{
template <class Range>
constexpr auto operator()(Range&& r) const
@ -1516,7 +1501,7 @@ namespace etl
{
namespace private_views
{
struct as_const : public range_adapter_closure_base
struct as_const
{
template <class Range>
constexpr auto operator()(Range&& r) const
@ -1741,7 +1726,7 @@ namespace etl
{
namespace private_views
{
struct cache_latest : public range_adapter_closure_base
struct cache_latest
{
template <class Range>
constexpr auto operator()(Range&& r) const
@ -1817,7 +1802,7 @@ namespace etl
{
namespace private_views
{
struct reverse : public range_adapter_closure_base
struct reverse
{
template <class Range>
constexpr auto operator()(Range&& r) const
@ -2412,7 +2397,7 @@ namespace etl
{
namespace private_views
{
struct join : public range_adapter_closure_base
struct join
{
template <class Range>
constexpr auto operator()(Range&& r) const
@ -4259,7 +4244,7 @@ namespace etl
{
namespace private_views
{
struct common : public range_adapter_closure_base
struct common
{
template <class Range>
constexpr auto operator()(Range&& r) const
@ -4419,7 +4404,7 @@ namespace etl
{
namespace private_views
{
struct enumerate : public range_adapter_closure_base
struct enumerate
{
template <class Range>
constexpr auto operator()(Range&& r) const
@ -4584,7 +4569,7 @@ namespace etl
namespace private_views
{
template <size_t N>
struct elements_fn : public range_adapter_closure_base
struct elements_fn
{
template <class Range>
constexpr auto operator()(Range&& r) const
@ -4812,7 +4797,7 @@ namespace etl
namespace private_views
{
template <size_t N>
struct adjacent_fn : public range_adapter_closure_base
struct adjacent_fn
{
template <class Range>
constexpr auto operator()(Range&& r) const
@ -6079,7 +6064,7 @@ namespace etl
{
namespace private_views
{
struct to_input : public range_adapter_closure_base
struct to_input
{
template <class Range>
constexpr auto operator()(Range&& r) const
@ -6167,6 +6152,13 @@ namespace etl
namespace views = ranges::views;
} // namespace etl
template < class Range, typename RangeAdaptorClosure, typename = etl::enable_if_t<etl::is_invocable_v<RangeAdaptorClosure, Range>>>
auto operator|(Range&& r, RangeAdaptorClosure rac)
{
return rac(etl::forward<Range>(r));
}
#endif
#endif

View File

@ -40,7 +40,7 @@ SOFTWARE.
#define ETL_VERSION_MAJOR 20
#define ETL_VERSION_MINOR 47
#define ETL_VERSION_PATCH 1
#define ETL_VERSION_PATCH 0
#define ETL_VERSION \
ETL_STRING(ETL_VERSION_MAJOR) \

View File

@ -1,6 +1,6 @@
{
"name": "Embedded Template Library",
"version": "20.47.1",
"version": "20.47.0",
"authors": {
"name": "John Wellbelove",
"email": "john.wellbelove@etlcpp.com"

View File

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

View File

@ -1,9 +1,4 @@
===============================================================================
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

View File

@ -16495,7 +16495,6 @@ namespace
CHECK_EQUAL(3, etl::ranges::min(-5, 3, etl::ranges::less{}, abs_proj));
}
#if ETL_HAS_INITIALIZER_LIST
//*************************************************************************
TEST(ranges_min_initializer_list)
{
@ -16518,7 +16517,6 @@ namespace
};
CHECK_EQUAL(9, etl::ranges::min({3, 1, 4, 5, 9, 2, 6}, etl::ranges::less{}, negate));
}
#endif
//*************************************************************************
TEST(ranges_min_range)
@ -16694,7 +16692,6 @@ namespace
CHECK_EQUAL(-5, etl::ranges::max(-5, 3, etl::ranges::less{}, abs_proj));
}
#if ETL_HAS_INITIALIZER_LIST
//*************************************************************************
TEST(ranges_max_initializer_list)
{
@ -16717,7 +16714,6 @@ namespace
};
CHECK_EQUAL(1, etl::ranges::max({3, 1, 4, 5, 9, 2, 6}, etl::ranges::less{}, negate));
}
#endif
//*************************************************************************
TEST(ranges_max_range)
@ -16918,7 +16914,6 @@ namespace
CHECK_EQUAL(-5, result2.max);
}
#if ETL_HAS_INITIALIZER_LIST
//*************************************************************************
TEST(ranges_minmax_initializer_list)
{
@ -16950,7 +16945,6 @@ namespace
CHECK_EQUAL(9, result.min);
CHECK_EQUAL(1, result.max);
}
#endif
//*************************************************************************
TEST(ranges_minmax_range)

View File

@ -37,14 +37,6 @@ SOFTWARE.
#include <sstream>
#include <vector>
// Issue #1391: include <ranges> when available to verify etl::operator|
// does not conflict with std::ranges::operator|.
#if ETL_USING_STL && ETL_USING_CPP20 && defined(__has_include)
#if __has_include(<ranges>)
#include <ranges>
#endif
#endif
#if ETL_USING_CPP17
// C++03 does not support move semantics as used in the ranges library

View File

@ -11526,7 +11526,6 @@
<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" />

View File

@ -3798,7 +3798,7 @@
<Filter>Tests\Callbacks &amp; Delegates</Filter>
</ClCompile>
<ClCompile Include="..\test_print.cpp">
<Filter>Tests\Strings</Filter>
<Filter>Tests</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
@ -3979,17 +3979,6 @@
<None Include="..\..\.github\workflows\gcc-c++23.yml">
<Filter>Resource Files\CI\Github</Filter>
</None>
<None Include="..\..\docs\_index.md">
<Filter>Documentation</Filter>
</None>
<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">

View File

@ -1 +1 @@
20.47.1
20.47.0