-Removed lambda expansions due to gcc generating call instructions

This commit is contained in:
2025-06-28 12:09:59 -04:00
parent 37fba8faad
commit 1573033b52
10 changed files with 298 additions and 67 deletions

View File

@@ -120,15 +120,16 @@ struct array
///
/// \brief
friend constexpr bool_t operator==(const array& lhs, const array& rhs)
{ return [lhs, rhs]<size_t...i>(index_sequence<i...>) -> bool_t // Lambda Declaration, Creates Indices at Compile Time
{ return ((lhs[i] == rhs[i]) && ...); }(make_index_sequence<ElemV>{}); } // Lambda Implementation,
{ return array::__compare(lhs, rhs, make_index_sequence<ElemV>{}); }
friend constexpr bool_t operator!=(const array& lhs, const array& rhs)
{ return [lhs, rhs]<size_t...i>(index_sequence<i...>) -> bool_t
{ return ((lhs[i] != rhs[i]) || ...); }(make_index_sequence<ElemV>{}); }
{ return not array::__compare(lhs, rhs, make_index_sequence<ElemV>{}); }
/// @}
private:
template<size_t...i>
static bool __compare(const array& lhs, const array& rhs, index_sequence<i...>) { return ((lhs[i] == rhs[i]) && ...); }
};
}