mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-18 18:06:10 +08:00
Merge branch 'pull-request/#1007-Fix-fixed-extent-span-empty()' into development
# Conflicts: # .gitignore
This commit is contained in:
commit
8d352bb00d
@ -272,7 +272,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
ETL_NODISCARD ETL_CONSTEXPR bool empty() const ETL_NOEXCEPT
|
||||
{
|
||||
return false;
|
||||
return Extent == 0;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -52,6 +52,7 @@ namespace
|
||||
typedef etl::span<int, 10U> View;
|
||||
typedef etl::span<int, 9U> SView;
|
||||
typedef etl::span<const int, 10U> CView;
|
||||
typedef etl::span<int, 0U> EView;
|
||||
|
||||
#if ETL_USING_CPP20
|
||||
using StdView = std::span<int, 10U>;
|
||||
@ -484,6 +485,9 @@ namespace
|
||||
{
|
||||
View view1(etldata.begin(), etldata.begin());
|
||||
CHECK(!view1.empty());
|
||||
|
||||
EView view2(etldata.begin(), etldata.begin());
|
||||
CHECK(view2.empty());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user