Edited comments

This commit is contained in:
John Wellbelove 2024-02-18 10:48:01 +00:00
parent 4b12e982e6
commit aad8024ef1

View File

@ -296,7 +296,7 @@ namespace etl
template <size_t COUNT>
ETL_NODISCARD ETL_CONSTEXPR etl::span<element_type, COUNT> first() const ETL_NOEXCEPT
{
//if Extent is static, check that original span contains at least 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<element_type, COUNT>(pbegin, pbegin + COUNT);
@ -316,7 +316,7 @@ namespace etl
template <size_t COUNT>
ETL_NODISCARD ETL_CONSTEXPR etl::span<element_type, COUNT> last() const ETL_NOEXCEPT
{
//if Extent is static, check that original span contains at least 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<element_type, COUNT>(pbegin + Extent - COUNT, (pbegin + Extent));
@ -338,10 +338,10 @@ namespace etl
ETL_NODISCARD ETL_CONSTEXPR
etl::span<element_type, COUNT != etl::dynamic_extent ? COUNT : Extent - OFFSET> subspan() const ETL_NOEXCEPT
{
//if Extent is static, check that OFFSET is 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
// 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");
return (COUNT == etl::dynamic_extent) ? etl::span<element_type, COUNT != etl::dynamic_extent ? COUNT : Extent - OFFSET>(pbegin + OFFSET, (pbegin + Extent))
@ -354,10 +354,10 @@ namespace etl
template <size_t OFFSET, size_t COUNT>
etl::span<element_type, COUNT != etl::dynamic_extent ? COUNT : Extent - OFFSET> subspan() const
{
//if Extent is static, check that OFFSET is 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
// 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");
if (COUNT == etl::dynamic_extent)