File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ namespace etl
272272 // *************************************************************************
273273 ETL_NODISCARD ETL_CONSTEXPR bool empty () const ETL_NOEXCEPT
274274 {
275- return false ;
275+ return Extent == 0 ;
276276 }
277277
278278 // *************************************************************************
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ namespace
5252 typedef etl::span<int , 10U > View;
5353 typedef etl::span<int , 9U > SView;
5454 typedef etl::span<const int , 10U > CView;
55+ typedef etl::span<int , 0U > EView;
5556
5657#if ETL_USING_CPP20
5758 using StdView = std::span<int , 10U >;
@@ -484,6 +485,9 @@ namespace
484485 {
485486 View view1 (etldata.begin (), etldata.begin ());
486487 CHECK (!view1.empty ());
488+
489+ EView view2 (etldata.begin (), etldata.begin ());
490+ CHECK (view2.empty ());
487491 }
488492
489493 // *************************************************************************
You can’t perform that action at this time.
0 commit comments