@@ -272,6 +272,26 @@ namespace etl
272
272
{
273
273
pbegin = other.pbegin ;
274
274
return *this ;
275
+ }
276
+
277
+ // *************************************************************************
278
+ // / Returns a reference to the value at index 'i'.
279
+ // *************************************************************************
280
+ ETL_NODISCARD ETL_CONSTEXPR14 reference at (size_t i)
281
+ {
282
+ ETL_ASSERT (i < size (), ETL_ERROR (array_out_of_range));
283
+
284
+ return pbegin[i];
285
+ }
286
+
287
+ // *************************************************************************
288
+ // / Returns a const reference to the value at index 'i'.
289
+ // *************************************************************************
290
+ ETL_NODISCARD ETL_CONSTEXPR14 const_reference at (size_t i) const
291
+ {
292
+ ETL_ASSERT (i < size (), ETL_ERROR (array_out_of_range));
293
+
294
+ return pbegin[i];
275
295
}
276
296
277
297
// *************************************************************************
@@ -614,6 +634,26 @@ namespace etl
614
634
return *this ;
615
635
}
616
636
637
+ // *************************************************************************
638
+ // / Returns a reference to the value at index 'i'.
639
+ // *************************************************************************
640
+ ETL_NODISCARD ETL_CONSTEXPR14 reference at (size_t i)
641
+ {
642
+ ETL_ASSERT (i < size (), ETL_ERROR (array_out_of_range));
643
+
644
+ return pbegin[i];
645
+ }
646
+
647
+ // *************************************************************************
648
+ // / Returns a const reference to the value at index 'i'.
649
+ // *************************************************************************
650
+ ETL_NODISCARD ETL_CONSTEXPR14 const_reference at (size_t i) const
651
+ {
652
+ ETL_ASSERT (i < size (), ETL_ERROR (array_out_of_range));
653
+
654
+ return pbegin[i];
655
+ }
656
+
617
657
// *************************************************************************
618
658
// / Returns a reference to the indexed value.
619
659
// *************************************************************************
0 commit comments