- Stacktrace generation with failed asserts
This commit is contained in:
@@ -57,7 +57,7 @@ struct array
|
||||
|
||||
///
|
||||
/// \copydetails array::at(size_t) const
|
||||
constexpr ValueT& at(size_t i) { static_assert(i < ElemV); assert(i < ElemV); return elements[i]; }
|
||||
constexpr ValueT& at(size_t i) { static_assert(i < ElemV); assert(i < ElemV, "Array Out of Bounds"); return elements[i]; }
|
||||
|
||||
///
|
||||
/// \brief access specified element, **with bounds checking**
|
||||
@@ -70,7 +70,7 @@ struct array
|
||||
///
|
||||
/// \par Space-Complexity
|
||||
/// Constant
|
||||
constexpr const ValueT& at(size_t i) const { static_assert(i < ElemV); assert(i < ElemV); return elements[i]; }
|
||||
constexpr const ValueT& at(size_t i) const { static_assert(i < ElemV); assert(i < ElemV, "Array Out of Bounds"); return elements[i]; }
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user