diff --git a/include/etl/span.h b/include/etl/span.h index 0bd3f1c1b..2caa38975 100644 --- a/include/etl/span.h +++ b/include/etl/span.h @@ -296,8 +296,8 @@ namespace etl template ETL_NODISCARD ETL_CONSTEXPR etl::span first() const ETL_NOEXCEPT { - //if extent is static, check that original span contains at least COUNT elements - ETL_STATIC_ASSERT((extent != etl::dynamic_extent) ? COUNT <= extent : true, "Original span does not contain COUNT elements"); + //if Extent is static, check that original span contains at least COUNT elements + ETL_STATIC_ASSERT((Extent != etl::dynamic_extent) ? COUNT <= Extent : true, "Original span does not contain COUNT elements"); return etl::span(pbegin, pbegin + COUNT); } @@ -316,8 +316,8 @@ namespace etl template ETL_NODISCARD ETL_CONSTEXPR etl::span last() const ETL_NOEXCEPT { - //if extent is static, check that original span contains at least COUNT elements - ETL_STATIC_ASSERT((extent != etl::dynamic_extent) ? COUNT <= extent : true, "Original span does not contain COUNT elements"); + //if Extent is static, check that original span contains at least COUNT elements + ETL_STATIC_ASSERT((Extent != etl::dynamic_extent) ? COUNT <= Extent : true, "Original span does not contain COUNT elements"); return etl::span(pbegin + Extent - COUNT, (pbegin + Extent)); } @@ -338,11 +338,11 @@ namespace etl ETL_NODISCARD ETL_CONSTEXPR etl::span subspan() const ETL_NOEXCEPT { - //if extent is static, check that OFFSET is within the original span - ETL_STATIC_ASSERT((extent != etl::dynamic_extent) ? OFFSET <= extent : true, "OFFSET is not within the original span"); + //if Extent is static, check that OFFSET is within the original span + ETL_STATIC_ASSERT((Extent != etl::dynamic_extent) ? OFFSET <= Extent : true, "OFFSET is not within the original span"); //if count is also static, check that OFFSET + COUNT is within the original span - ETL_STATIC_ASSERT((extent != etl::dynamic_extent) && (COUNT != etl::dynamic_extent) ? COUNT <= (extent - OFFSET) : true, "OFFSET + COUNT is not within the original span"); + ETL_STATIC_ASSERT((Extent != etl::dynamic_extent) && (COUNT != etl::dynamic_extent) ? COUNT <= (Extent - OFFSET) : true, "OFFSET + COUNT is not within the original span"); return (COUNT == etl::dynamic_extent) ? etl::span(pbegin + OFFSET, (pbegin + Extent)) : etl::span(pbegin + OFFSET, pbegin + OFFSET + COUNT); @@ -354,11 +354,11 @@ namespace etl template etl::span subspan() const { - //if extent is static, check that OFFSET is within the original span - ETL_STATIC_ASSERT((extent != etl::dynamic_extent) ? OFFSET <= extent : true, "OFFSET is not within the original span"); + //if Extent is static, check that OFFSET is within the original span + ETL_STATIC_ASSERT((Extent != etl::dynamic_extent) ? OFFSET <= Extent : true, "OFFSET is not within the original span"); //if count is also static, check that OFFSET + COUNT is within the original span - ETL_STATIC_ASSERT((extent != etl::dynamic_extent) && (COUNT != etl::dynamic_extent) ? COUNT <= (extent - OFFSET) : true, "OFFSET + COUNT is not within the original span"); + ETL_STATIC_ASSERT((Extent != etl::dynamic_extent) && (COUNT != etl::dynamic_extent) ? COUNT <= (Extent - OFFSET) : true, "OFFSET + COUNT is not within the original span"); if (COUNT == etl::dynamic_extent) {