function at [SWS_CORE_01273]
constexpr reference at (size_type n) noexcept;
As per corresponding usage in [array] except for the following deviations: 1. if (n >= size()) IsoStdOutOfRangeViolation is raised instead of std:: out_of_range
The member function at of class ara::core::Array enables synchronous read and write access to an array element at the specified position n with implicit bounds checking [SWS_CORE_01273]. The function returns a mutable reference (reference) to the addressed element and can be evaluated at compile time (constexpr) [SWS_CORE_01273].
In case of error, when the requested index reaches or exceeds the container bound (n >= size()), the behavior deviates from the standard C++ container std::array: instead of an exception of type std::out_of_range, a IsoStdOutOfRangeViolation is triggered [SWS_CORE_01273]. Since the signature is declared as noexcept and classified as exception-safe, no regular C++ exceptions are thrown [SWS_CORE_01273]. Interpretation: Triggering this violation in a noexcept context is likely to lead directly to controlled termination of execution. Question Q-72c19d096572f6bc (open)
For read-only instances, there is the complementary const overload [SWS_CORE_01274], which provides a const reference. The same error semantics via IsoStdOutOfRangeViolation are also consistently applied in related containers such as ara::core::Vector ([SWS_CORE_01354], [SWS_CORE_01355]) and ara::core::StringView [SWS_CORE_02133].
This text was generated by an AI and serves as guidance. The AUTOSAR specification is authoritative.
| Header-Datei | #include "ara/core/array.h" |
|---|---|
| Scope | class ara::core::Array |
| Exception-Sicherheit | exception safe |
| Verletzungen (Violations) | IsoStdOut- Description as per std::out_of_range. OfRangeViolation |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_CORE_01273- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CORE_01273@rel:R25-11#308608e3- Content hash
308608e3- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01273
Status: valid/unmigrated
Version: rel:R25-11#6a1edbad
Versionshistorie & Revisions (1 transition, 4 revision)
- Current State
valid/unmigrated- Reason
- mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
- Campaign
2026-08-13-status-backfill- Active Version
AUTOSAR/AP/record/SWS_CORE_01273@rel:R25-11#6a1edbad
Recorded Revisions (4):
- R25-11
rel:R25-11#308608e32026-09-30 - R23-11
rel:R23-11#4ed017962026-10-14 - R24-11
rel:R24-11#320bb84e2026-10-14 - R25-11
rel:R25-11#6a1edbad2026-10-14 active
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
gemini-3.8-flash-low· 2026-10-13 · German original