functie hash< ara::core::Optional< T [SWS_CORE_01199]
size_t operator() (ara::core::Optional< T > const &v) const noexcept;
Invoke the hashing function
De specialisatie struct std::hash<ara::core::Optional<T>> dient voor het berekenen van hashwaarden voor optionele objecten van het type ara::core::Optional<T> conform [SWS_CORE_01199]. Deze maakt het directe gebruik mogelijk van ara::core::Optional<T> als sleuteltype in ongeordende respectievelijk hashgebaseerde standaardcontainers zoals std::unordered_map of std::unordered_set.
Gebruik
De aanroep geschiedt synchroon via de functieaanroep-operator operator(), die gedeclareerd is in het headerbestand #include "ara/core/optional.h" ([SWS_CORE_01199]):
- Parameters: Het optionele object
vwordt doorgegeven als constante referentieara::core::Optional<T> const &([SWS_CORE_01199]). - Retourwaarde: Een hashwaarde van het type
size_t([SWS_CORE_01199]). - Semantiek: De aanroep voert de hashfunctie uit voor de doorgegeven instantie ([SWS_CORE_01199]).
Foutafhandeling en exception-veiligheid
De operatie is gedeclareerd als noexcept en geldt als uitzonderingsveilig (exception safe) volgens [SWS_CORE_01199]. Er bestaan geen specifieke AUTOSAR-foutcodes of meldingen aan fout-hooks (zoals DET of DEM), aangezien de berekening foutloos zonder excepties wordt uitgevoerd ([SWS_CORE_01199]).
Gelijktijdigheid en randvoorwaarden
Aangezien operator() gedeclareerd is als const-methode en het argument uitsluitend lezend bindt als constante referentie, is de berekening vermoedelijk gelijktijdig en re-entrant uitvoerbaar, mits het onderliggende hashmechanisme voor het ingesloten type T vrij is van neveneffecten ([SWS_CORE_01199]). Vraag Q-4947f900db7a4494 (open)
Deze tekst is opgesteld door een AI en is gebaseerd op specificatiestand R25-11.
| Header-Datei | #include "ara/core/optional.h" |
|---|---|
| Scope | struct std::hash< ara::core::Optional< T > > |
| Exception-Sicherheit | exception safe |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_CORE_01199- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CORE_01199@rel:R25-11#0e68192c- Content hash
0e68192c- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01199
Status: valid/unmigrated
Version: rel:R25-11#bfc5a921
Versionshistorie & Revisions (1 transition)
- 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_01199@rel:R25-11#bfc5a921
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 · Duits origineel