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 @@ -238,7 +238,7 @@ namespace etl
238238 // *************************************************************************
239239 ETL_NODISCARD ETL_CONSTEXPR bool empty () const ETL_NOEXCEPT
240240 {
241- return false ;
241+ return Extent == 0 ;
242242 }
243243
244244 // *************************************************************************
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 >;
@@ -464,6 +465,9 @@ namespace
464465 {
465466 View view1 (etldata.begin (), etldata.begin ());
466467 CHECK (!view1.empty ());
468+
469+ EView view2 (etldata.begin (), etldata.begin ());
470+ CHECK (view2.empty ());
467471 }
468472
469473 // *************************************************************************
You can’t perform that action at this time.
0 commit comments