-Removed lambda expansions due to gcc generating call instructions
This commit is contained in:
@@ -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]) && ...); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user