y3c-stl 0.3.3
Friendly C++ STL wrapper with automatic stacktrace
Loading...
Searching...
No Matches
array-at.cc

‍example output:

y3c-stl terminated: exception of type y3c::out_of_range thrown
at y3c::array<int, 5>::at(): attempted to access index 100, that is outside the bounds of size 5.
Stack trace (most recent call first):
#0 0x0000561a638c36d8 in main at /home/runner/work/y3c-stl/y3c-stl/build/../examples/array-at.cc:5:9
3: int main() {
5: a.at(100) = 42;
6: }
固定長配列 (std::array)
Definition array.h:20
reference at(size_type n, internal::skip_trace_tag={})
要素アクセス
Definition array.h:133
Definition terminate.h:179
Definition array.h:8
#include <y3c/array>
int main() {
a.at(100) = 42;
}