DEENESPTFRRUARHIKOZHNL

class ara::core::Variant

[SWS_CORE_01601] Upstream: RS_AP_00130

template <typename...                Types> class Variant {...};

Implementation of std::variant type from [basic.string]

Header-Datei#include "ara/core/variant.h"
Forwarding-Header#include "ara/core/core_fwd.h"
Scopenamespace ara::core

User GuideKI-GENERIERT

Speichert typsicher genau einen Wert aus einer definierten Typmenge mit bedingter Ausnahmesicherheit.
KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 223b5b60b80c Herkunft Offene Fragen (2)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Speichert typsicher genau einen Wert aus einer definierten Typmenge mit bedingter Ausnahmesicherheit.

Die Template-Klasse ara::core::Variant dient als typsichere Union zur Speicherung und Verwaltung genau eines Wertes aus einer vorgegebenen Typenmenge [SWS_CORE_01649]. Sie unterstützt flexible Konstruktions-, Zuweisungs- und Emplace-Mechanismen und erlaubt die Bestimmung der aktiven Alternative über index() [SWS_CORE_01665]. Wichtigste Besonderheit gegenüber dem Standard sind die modifizierten, bedingten Noexcept-Spezifikationen sämtlicher modifizierender Operationen sowie die Absicherung gegen den Zustand valueless_by_exception() [SWS_CORE_01666].

Kontext

Die Template-Klasse ara::core::Variant stellt eine typsichere Union für die AUTOSAR Adaptive Platform dar, die über den Header ara/core/variant.h eingebunden wird. Sie kapselt die Verwaltung genau eines Wertes aus einer zur Übersetzungszeit definierten Typenliste (template <typename... Types> class Variant). Die Definition orientiert sich grundlegend am Verhalten von std::variant aus dem C++-Standard [variant], weist jedoch spezifische AUTOSAR-Abweichungen hinsichtlich der Ausnahmespezifikation auf. Die Beschreibung der Klasse verweist im Metadatenbestand auf [basic.string]; Interpretation: hierbei dürfte es sich um eine redaktionelle Unstimmigkeit handeln, da sämtliche Anforderungen konsistent den Standardabschnitt [variant] referenzieren. Frage Q-809de1af74fcb689 (offen)

Lebenszyklus

Eine Instanz von ara::core::Variant durchläuft deterministische Lebenszyklusphasen von der Initialisierung über Wertwechsel bis zur Zerstörung. Die Erzeugung erfolgt entweder über den parameterlosen Default-Konstruktor [SWS_CORE_01649], der die erste Alternative initialisiert, über Kopier- und Verschiebekonstruktoren [SWS_CORE_01650], [SWS_CORE_01651] oder über direkte Wertübergabe [SWS_CORE_01652]. Zudem stehen Überladungen für die In-Place-Konstruktion mittels in_place_type_t [SWS_CORE_01653], [SWS_CORE_01654] sowie in_place_index_t [SWS_CORE_01655], [SWS_CORE_01656] zur Verfügung, auch in Kombination mit Initialisierungslisten.

Im regulären Zustand hält das Objekt stets eine gültige Alternative, deren nullbasierter Index mit der Methode index() ermittelt werden kann [SWS_CORE_01665]. Scheitert ein Wertwechsel während einer Konstruktion oder Zuweisung durch das Auslösen einer Ausnahme, geht die Instanz in den Zustand valueless_by_exception() über [SWS_CORE_01666]. Das Objekt verbleibt in diesem Zustand, bis durch eine erfolgreiche Neuinitialisierung wieder eine gültige Alternative belegt wird. Der Destruktor zerstört das aktuell gehaltene Objekt ordnungsgemäß und ist bedingt ausnahmesicher deklariert [SWS_CORE_01657].

variant_lifecycle Uninitialisiert Uninitialisiert Gueltig Gueltig Uninitialisiert->Gueltig Konstruktion Gueltig->Gueltig operator= / emplace() ValuelessByException ValuelessByException Gueltig->ValuelessByException Fehlschlag Zuweisung / emplace Zerstoert Zerstoert Gueltig->Zerstoert ~Variant() ValuelessByException->Gueltig Erfolgreiches emplace() ValuelessByException->Zerstoert ~Variant()

Zustandsdiagramm: Zustandsübergänge einer Variant-Instanz zwischen typbelegter Gültigkeit und dem Ausnahmezustand. Quellen: [SWS_CORE_01649], [SWS_CORE_01657], [SWS_CORE_01661], [SWS_CORE_01665], [SWS_CORE_01666]

Nutzungspfad

Ein typischer Nutzungsablauf umfasst die Instanziierung, das Zuweisen oder Ersetzen des Inhalts, die Abfrage des Zustands und den Werteaustausch:

Da das vorliegende Spezifikations-Record-Set ausschließlich Elementfunktionen umfasst, fehlen direkte Leseoperationen wie ein Wertzugriff; vermutlich werden Zugriffs- und Besuchsfunktionen (analog zu std::get oder std::visit) als freie Hilfsfunktionen im Namensraum ara::core bereitgestellt. Frage Q-75847ac18088da57 (offen)

Fehlerszenarien

Im Zentrum der Fehlerbehandlung steht die Eigenschaft der bedingten Ausnahmesicherheit (conditionally exception safe). Während die Standardbibliothek für std::variant feste Noexcept-Regeln vorsieht, weicht AUTOSAR gezielt ab: Sämtliche Konstruktoren [SWS_CORE_01650], [SWS_CORE_01653], Zuweisungsoperatoren [SWS_CORE_01658], emplace-Operationen [SWS_CORE_01661], [SWS_CORE_01663], die Tauschfunktion swap() [SWS_CORE_01667] sowie der Destruktor [SWS_CORE_01657] sind bedingt noexcept. Ihre Ausnahmegarantie hängt direkt von den Noexcept-Eigenschaften der zugrundeliegenden Typkonstruktoren ab.

Wirft die Konstruktion eines neuen Wertes während einer Zuweisung oder eines emplace-Aufrufs eine Ausnahme, kann die Variante in einen ungültigen Zwischenzustand geraten. Dieser wird über valueless_by_exception() signalisiert [SWS_CORE_01666]. Ausschließlich die beiden Abfragefunktionen index() [SWS_CORE_01665] und valueless_by_exception() [SWS_CORE_01666] bieten eine uneingeschränkte noexcept-Garantie und sind vollständig ausnahmesicher.

Dieser Leitfaden basiert auf der AUTOSAR-Spezifikation für die Adaptive Platform (Release R25-11, Modul core) und wurde durch einen KI-Kurations-Assistenten aufbereitet.

Mitgliederkarte

Konstruktoren und Destruktor

2

Operatoren

1

Klassendiagramm

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__core__Variant465 Variant + Variant() + operator=() + ~Variant() + emplace() + swap() + index() + valueless_by_exception()

Detailansicht

Wähle in der Gliederung einen Eintrag aus.

Konstruktoren und Destruktor

Variant function 8

≙ [variant]

Überladungen Variant 8
constexpr Variant () noexcept({<cond-noexcept-1>}); SWS_CORE_01649
Variant (const Variant &other) noexcept({<cond-noexcept-2>}); SWS_CORE_01650
Variant (Variant &&other) noexcept({<cond-noexcept-3>}); SWS_CORE_01651
template <typename T> constexpr Variant (T &&value) noexcept({<cond-noexcept-4>}); SWS_CORE_01652
template <typename T, typename... Args> explicit constexpr Variant (in_place_type_t< T > tag, Args &&... args) noexcept(std::is_nothrow_constructible< T, Args... >::value); SWS_CORE_01653
template <typename T, typename U, typename... Args> explicit constexpr Variant (in_place_type_t< T > tag, std::initializer_list< U > il, Args &&... args) noexcept(std::is_ nothrow_constructible< T, std::initializer_list< U > &, Args &&... >::value); SWS_CORE_01654
template <std::size_t I, typename... Args> explicit constexpr Variant (in_place_index_t< I > tag, Args &&... args) noexcept({<cond-noexcept-5>}); SWS_CORE_01655
template <std::size_t I, typename U, typename... Args> explicit constexpr Variant (in_place_index_t< I > tag, std::initializer_list< U > il, Args &&... args) noexcept( {<cond-noexcept-6>}); SWS_CORE_01656
~Variant function

except for the following deviations: 1. Function is conditionally noexcept ≙ [variant]

~Variant () noexcept({<cond-noexcept-7>});

Methoden

emplace function 4

except for the following deviations: 1. Function is conditionally noexcept ≙ [variant]

Überladungen emplace 4
template <typename T, typename... Args> T & emplace (Args &&... args) noexcept(std::is_nothrow_constructible< T, Args... >::value); SWS_CORE_01661
template <typename T, typename U, typename... Args> T & emplace (std::initializer_list< U > il, Args &&... args) noexcept(std::is_nothrow_constructible< T, std::initializer_list< U > &, Args &&... >::value); SWS_CORE_01662
template <std::size_t I, typename... Args> variant_alternative_t< I, Variant< Types... > > & emplace (Args &&... args) noexcept({<cond-noexcept-11>}); SWS_CORE_01663
template <std::size_t I, typename U, typename... Args> variant_alternative_t< I, Variant< Types... > > & emplace (std::initializer_list< U > il, Args &&... args) noexcept( {<cond-noexcept-12>}); SWS_CORE_01664
index function

≙ [variant]

constexpr std::size_t index () const noexcept;
swap function

except for the following deviations: 1. Conditions for the conditional exception safety are modified ≙ [variant]

void swap (Variant &other) noexcept({<cond-noexcept-13>});

≙ [variant]

constexpr bool valueless_by_exception () const noexcept;

Operatoren

operator= function 3

except for the following deviations: 1. Function is conditionally noexcept ≙ [variant]

Überladungen = 3
constexpr Variant & operator= (const Variant &other) noexcept( {<cond-noexcept-8>}); SWS_CORE_01658
constexpr Variant & operator= (Variant &&other) noexcept( {<cond-noexcept-9>}); SWS_CORE_01659
template <typename T> Variant & operator= (T &&value) noexcept({<cond-noexcept-10>}); SWS_CORE_01660

Dokumentation der Methoden

function Variant [SWS_CORE_01649]

constexpr Variant () noexcept({<cond-noexcept-1>});

As per corresponding usage in [variant]

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitconditionally exception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01649
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01649@rel:R25-11#300cfb64
Content hash
300cfb64
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01649
Status: valid/unmigrated Version: rel:R25-11#db2002ad Versionshistorie & Revisions (1 transition, 3 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_01649@rel:R25-11#db2002ad
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#300cfb642026-09-30
  • R24-11rel:R24-11#93873aed2026-10-14
  • R25-11rel:R25-11#db2002ad2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Variant [SWS_CORE_01650]

Variant (const Variant &other) noexcept({<cond-noexcept-2>});

As per corresponding usage in [variant] except for the following deviations: 1. Function is conditionally noexcept

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitconditionally exception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01650
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01650@rel:R25-11#d7b9f421
Content hash
d7b9f421
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01650
Status: valid/unmigrated Version: rel:R25-11#b0ca00aa Versionshistorie & Revisions (1 transition, 3 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_01650@rel:R25-11#b0ca00aa
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#d7b9f4212026-09-30
  • R24-11rel:R24-11#8ec330a02026-10-14
  • R25-11rel:R25-11#b0ca00aa2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Variant [SWS_CORE_01651]

Variant (Variant &&other) noexcept({<cond-noexcept-3>});

As per corresponding usage in [variant] Move constructor

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitconditionally exception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01651
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01651@rel:R25-11#6c182678
Content hash
6c182678
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01651
Status: valid/unmigrated Version: rel:R25-11#2e696abb Versionshistorie & Revisions (1 transition, 3 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_01651@rel:R25-11#2e696abb
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#6c1826782026-09-30
  • R24-11rel:R24-11#7374aec42026-10-14
  • R25-11rel:R25-11#2e696abb2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Variant [SWS_CORE_01652]

template <typename T> constexpr Variant (T &&value) noexcept({<cond-noexcept-4>});

As per corresponding usage in [variant]

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitconditionally exception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01652
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01652@rel:R25-11#8e7ec9d8
Content hash
8e7ec9d8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01652
Status: valid/unmigrated Version: rel:R25-11#e2bf0fdc Versionshistorie & Revisions (1 transition, 3 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_01652@rel:R25-11#e2bf0fdc
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#8e7ec9d82026-09-30
  • R24-11rel:R24-11#db8b85bc2026-10-14
  • R25-11rel:R25-11#e2bf0fdc2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Variant [SWS_CORE_01653]

template <typename T, typename... Args> explicit constexpr Variant (in_place_type_t< T > tag, Args &&... args) noexcept(std::is_nothrow_constructible< T, Args... >::value);

As per corresponding usage in [variant] except for the following deviations: 1. Function is conditionally noexcept

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitconditionally exception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01653
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01653@rel:R25-11#015da83e
Content hash
015da83e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01653
Status: valid/unmigrated Version: rel:R25-11#b0122423 Versionshistorie & Revisions (1 transition, 3 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_01653@rel:R25-11#b0122423
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#015da83e2026-09-30
  • R24-11rel:R24-11#cb5845952026-10-14
  • R25-11rel:R25-11#b01224232026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Variant [SWS_CORE_01654]

template <typename T, typename U, typename... Args> explicit constexpr Variant (in_place_type_t< T > tag, std::initializer_list< U > il, Args &&... args) noexcept(std::is_ nothrow_constructible< T, std::initializer_list< U > &, Args &&... >::value);

As per corresponding usage in [variant] except for the following deviations: 1. Function is conditionally noexcept

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitconditionally exception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01654
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01654@rel:R25-11#dbc17b3a
Content hash
dbc17b3a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01654
Status: valid/unmigrated Version: rel:R25-11#a3d5e977 Versionshistorie & Revisions (1 transition, 3 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_01654@rel:R25-11#a3d5e977
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#dbc17b3a2026-09-30
  • R24-11rel:R24-11#96abcd352026-10-14
  • R25-11rel:R25-11#a3d5e9772026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Variant [SWS_CORE_01655]

template <std::size_t I, typename... Args> explicit constexpr Variant (in_place_index_t< I > tag, Args &&... args) noexcept({<cond-noexcept-5>});

As per corresponding usage in [variant] except for the following deviations: 1. Function is conditionally noexcept

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitconditionally exception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01655
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01655@rel:R25-11#05d41ae0
Content hash
05d41ae0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01655
Status: valid/unmigrated Version: rel:R25-11#59578a03 Versionshistorie & Revisions (1 transition, 3 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_01655@rel:R25-11#59578a03
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#05d41ae02026-09-30
  • R24-11rel:R24-11#4731b7332026-10-14
  • R25-11rel:R25-11#59578a032026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Variant [SWS_CORE_01656]

template <std::size_t I, typename U, typename... Args> explicit constexpr Variant (in_place_index_t< I > tag, std::initializer_list< U > il, Args &&... args) noexcept( {<cond-noexcept-6>});

As per corresponding usage in [variant] except for the following deviations: 1. Function is conditionally noexcept

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitconditionally exception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01656
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01656@rel:R25-11#f254bcf0
Content hash
f254bcf0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01656
Status: valid/unmigrated Version: rel:R25-11#2e213ddd Versionshistorie & Revisions (1 transition, 3 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_01656@rel:R25-11#2e213ddd
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#f254bcf02026-09-30
  • R24-11rel:R24-11#bff0ca532026-10-14
  • R25-11rel:R25-11#2e213ddd2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function emplace [SWS_CORE_01661]

template <typename T, typename... Args> T & emplace (Args &&... args) noexcept(std::is_nothrow_constructible< T, Args... >::value);

As per corresponding usage in [variant] except for the following deviations: 1. Function is conditionally noexcept

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 0fe1e0b61069 Herkunft Offene Fragen (1)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Die Elementfunktion emplace konstruiert einen alternativen Wert des Typs T direkt in einer bestehenden Instanz von ara::core::Variant [SWS_CORE_01661]. Die Funktion wird über die Header-Datei #include "ara/core/variant.h" bereitgestellt und synchron ausgeführt [SWS_CORE_01661]. Als Parameter übernimmt sie Weiterleitungsreferenzen args..., die an den Konstruktor des Zieltyps T übergeben werden, und gibt eine Referenz auf das neu erzeugte Objekt zurück [SWS_CORE_01661].

Bezüglich der Fehlerbehandlung ist die Operation als bedingt ausnahmesicher („conditionally exception safe“) deklariert [SWS_CORE_01661]. Sie folgt dem Standardverhalten von variant, weicht jedoch durch eine bedingte noexcept-Spezifikation ab: Eine Ausnahme wird genau dann ausgeschlossen, wenn std::is_nothrow_constructible<T, Args...>::value erfüllt ist [SWS_CORE_01661]. Spezifische AUTOSAR-Fehlercodes oder Meldungen an DET oder DEM sind für diese Basisfunktion nicht definiert.

Hinsichtlich Nebenläufigkeit und Aufrufkontext nennt die Spezifikation keine abweichenden Garantien. Interpretation: Der gleichzeitige schreibende Zugriff mehrerer Threads auf dieselbe Variant-Instanz via emplace dürfte ohne externe Synchronisation nicht threadsicher sein, da AUTOSAR auf die Standardsemantik von variant verweist. Frage Q-4d9d118b9916a3dc (offen)

Im Zusammenspiel innerhalb von ara::core::Variant existieren weitere Überladungen für Initialisierungslisten [SWS_CORE_01662] sowie indexbasierte In-Place-Konstruktionen [SWS_CORE_01663], [SWS_CORE_01664]. Analoge emplace-Operationen sind im Core-Modul zudem für ara::core::Optional ([SWS_CORE_01119], [SWS_CORE_01120], [SWS_CORE_01164]) sowie Container wie ara::core::Vector [SWS_CORE_01366] und ara::core::Map [SWS_CORE_01458] spezifiziert.

Dieser Nutzungshinweis wurde automatisch auf Basis der AUTOSAR-Spezifikation für R25-11 generiert.

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitconditionally exception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01661
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01661@rel:R25-11#6250f84a
Content hash
6250f84a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01661
Status: valid/unmigrated Version: rel:R25-11#2a14eef2 Versionshistorie & Revisions (1 transition, 3 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_01661@rel:R25-11#2a14eef2
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#6250f84a2026-09-30
  • R24-11rel:R24-11#b4d067862026-10-14
  • R25-11rel:R25-11#2a14eef22026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function emplace [SWS_CORE_01662]

template <typename T, typename U, typename... Args> T & emplace (std::initializer_list< U > il, Args &&... args) noexcept(std::is_nothrow_constructible< T, std::initializer_list< U > &, Args &&... >::value);

As per corresponding usage in [variant] except for the following deviations: 1. Function is conditionally noexcept

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: a346c9068921 Herkunft Offene Fragen (2)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Die Elementfunktion emplace von ara::core::Variant aus dem Header ara/core/variant.h dient der synchronen Erzeugung einer Alternative vom Typ T direkt im Speicher der bestehenden Instanz [SWS_CORE_01662]. Hierbei werden eine std::initializer_list<U> sowie weitergeleitete Argumente Args&&... args an den Konstruktor des Typs übergeben. Als Rückgabewert liefert die Funktion eine lvalue-Referenz T& auf das neu initialisierte Objekt [SWS_CORE_01662].

Hinsichtlich der Fehlerbehandlung und Ausnahmebehandlung weicht die Funktion von der Standarddefinition in [variant] ab: Sie ist als bedingt ausnahmesicher (conditionally exception safe) eingestuft und verfügt über eine bedingte noexcept-Spezifikation [SWS_CORE_01662]. Ein Aufruf garantiert Ausnahmefreiheit, sofern std::is_nothrow_constructible<T, std::initializer_list<U>&, Args&&...>::value zu true evaluiert [SWS_CORE_01662]. Spezifische AUTOSAR-Fehlercodes oder Meldekanäle an DET und DEM existieren für dieses Element nicht.

In Bezug auf Nebenläufigkeit und Randbedingungen gilt: Da emplace den Zustand der Variant-Instanz verändert, dürfte ein nebenläufiger Aufruf ohne externe Synchronisation nicht threadsicher sein. Interpretation: Vor der Konstruktion des neuen Objekts wird ein zuvor enthaltener Wert zerstört, wie es dem allgemeinen Verhalten von [variant] entspricht. Frage Q-548c84cc1d327030 (offen)

Im Zusammenspiel mit verwandten Schnittstellen bildet die Funktion das typbasierte Gegenstück zur Überladung ohne Initialisierungsliste [SWS_CORE_01661] sowie zu den indexbasierten Alternativen [SWS_CORE_01663] und [SWS_CORE_01664]. Ähnliche Schnittstellenkonzepte finden sich bei ara::core::Optional [SWS_CORE_01120] sowie bei Containern wie ara::core::Vector [SWS_CORE_01366] oder ara::core::Map [SWS_CORE_01458], wobei Container-Emplace-Operationen im Unterschied hierzu nicht ausnahmesicher sind.

Dieser Nutzungshinweis wurde automatisch auf Basis der Spezifikationsdaten von AUTOSAR R25-11 erstellt.

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitconditionally exception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01662
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01662@rel:R25-11#1585bce4
Content hash
1585bce4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01662
Status: valid/unmigrated Version: rel:R25-11#82a43049 Versionshistorie & Revisions (1 transition, 3 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_01662@rel:R25-11#82a43049
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#1585bce42026-09-30
  • R24-11rel:R24-11#70a0b4a72026-10-14
  • R25-11rel:R25-11#82a430492026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function emplace [SWS_CORE_01663]

template <std::size_t I, typename... Args> variant_alternative_t< I, Variant< Types...                > > & emplace (Args &&... args) noexcept({<cond-noexcept-11>});

As per corresponding usage in [variant] except for the following deviations: 1. Function is conditionally noexcept

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: f8cbed1f17b1 Herkunft Offene Fragen (1)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Verwendung

Die Elementfunktion emplace der Klasse ara::core::Variant ([SWS_CORE_01663]) aus der Header-Datei ara/core/variant.h dient der direkten Konstruktion der durch den Template-Index I bestimmten Alternative im bestehenden Speicher des Objekts. Als Parameter werden die Argumente Args&&... args übergeben. Der Aufruf erfolgt synchron und liefert eine Referenz auf den neu erzeugten Wert vom Typ variant_alternative_t<I, Variant<Types...>> zurück ([SWS_CORE_01663]). Das Verhalten richtet sich nach der Definition in [variant] ([SWS_CORE_01663]).

Fehlerbehandlung und Exception-Sicherheit

Die Spezifikation definiert als Abweichung vom C++-Standard eine bedingte noexcept({<cond-noexcept-11>})-Klausel sowie die Eigenschaft conditionally exception safe ([SWS_CORE_01663]). Vermutlich hängt das Auslösen von Ausnahmen davon ab, ob der Konstruktor der Zielalternative für die weitergereichten Typen Args... ausnahmesicher ist. Frage Q-189fe417e9ef4980 (offen) Spezifische Fehlercodes, Rückgabewerte im Fehlerfall oder Benachrichtigungen an DET oder DEM sind für diese Funktion nicht spezifiziert.

Zusammenspiel und Alternativen

Innerhalb des Moduls core und des Typs ara::core::Variant ist die Funktion in ein System weiterer Überladungen eingebettet:

Dieser Nutzungshinweis basiert auf den Spezifikationen des Moduls core aus Release R25-11.

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitconditionally exception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01663
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01663@rel:R25-11#f203d419
Content hash
f203d419
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01663
Status: valid/unmigrated Version: rel:R25-11#a87bd2d7 Versionshistorie & Revisions (1 transition, 3 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_01663@rel:R25-11#a87bd2d7
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#f203d4192026-09-30
  • R24-11rel:R24-11#f520ae852026-10-14
  • R25-11rel:R25-11#a87bd2d72026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function emplace [SWS_CORE_01664]

template <std::size_t I, typename U, typename... Args> variant_alternative_t< I, Variant< Types... > > & emplace (std::initializer_list< U > il, Args &&... args) noexcept( {<cond-noexcept-12>});

As per corresponding usage in [variant] except for the following deviations: 1. Function is conditionally noexcept

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: a600ca3cb60d Herkunft Offene Fragen (1)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Die Elementfunktion emplace aus ara/core/variant.h konstruiert synchron einen neuen Alternativwert direkt an Ort und Stelle innerhalb einer bestehenden Instanz von ara::core::Variant [SWS_CORE_01664]. Der anzusprechende Typ wird dabei fest über den Template-Index I bestimmt. Der Aufruf nimmt eine Initialisiererliste il des Typs std::initializer_list<U> sowie optionale Argumente args entgegen und liefert eine Referenz auf den neu erzeugten Wert vom Typ variant_alternative_t<I, Variant<Types...>>& zurück [SWS_CORE_01664].

Für die Fehlerbehandlung ist die Operation als bedingt ausnahmesicher (conditionally exception safe) eingestuft und mit einem bedingten noexcept versehen [SWS_CORE_01664]. Die Auswertung der Bedingung {<cond-noexcept-12>} dürfte vermutlich davon abhängen, ob der Konstruktor des Zieltyps mit il und args keine Exceptions wirft. Frage Q-87f90253fc61c883 (offen) Spezifische Fehlercodes sowie Meldungen an DET oder DEM sind in der Spezifikation nicht definiert; das Verhalten bei Ausnahmen folgt bis auf die noexcept-Deklaration dem Standardverhalten von [variant] [SWS_CORE_01664].

Innerhalb von ara::core::Variant ergänzt die Funktion die indexbasierte Erzeugung ohne Initialisiererliste [SWS_CORE_01663] sowie die beiden typbasierten Varianten [SWS_CORE_01661] und [SWS_CORE_01662]. Analoge emplace-Funktionen zur direkten In-Place-Konstruktion existieren im Modul core auch für ara::core::Optional ([SWS_CORE_01119], [SWS_CORE_01120], [SWS_CORE_01164]) sowie für Container wie ara::core::Vector ([SWS_CORE_01366]) und ara::core::Map ([SWS_CORE_01458]).

Dieser Verwendungshinweis wurde automatisiert auf Basis der Spezifikation erstellt.

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitconditionally exception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01664
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01664@rel:R25-11#cc05518c
Content hash
cc05518c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01664
Status: valid/unmigrated Version: rel:R25-11#1815524e Versionshistorie & Revisions (1 transition, 3 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_01664@rel:R25-11#1815524e
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#cc05518c2026-09-30
  • R24-11rel:R24-11#6ff4fca72026-10-14
  • R25-11rel:R25-11#1815524e2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function index [SWS_CORE_01665]

constexpr std::size_t index () const noexcept;

As per corresponding usage in [variant]

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: fb0fc41b4094 Herkunft Offene Fragen (1)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Die Elementfunktion index der Klasse ara::core::Variant dient zur synchronen Abfrage des nullbasierten Index des aktuell gehaltenen Typs gemäß Spezifikation [SWS_CORE_01665]. Sie verhält sich analog zur entsprechenden Verwendung im Standard-C++-Typ std::variant („As per corresponding usage in [variant]“), nimmt keine Parameter entgegen und liefert den aktuellen Index als std::size_t zurück. Deklariert ist sie im Header ara/core/variant.h und als constexpr sowie noexcept qualifiziert.

Hinsichtlich der Fehlerbehandlung und Ausnahme-Sicherheit ist die Methode als exception safe spezifiziert [SWS_CORE_01665]. Da sie als noexcept deklariert ist, wirft sie selbst keine Ausnahmen und löst keine Fehlerbedingungen aus. Aufrufer können den zurückgegebenen Index auswerten, um vor dem Zugriff auf alternative Werte sicherzustellen, welcher Typ im ara::core::Variant aktiv ist.

Im Zusammenspiel mit den typisierten Zugriffsfunktionen ara::core::get spielt index eine zentrale Rolle: Die Überladungen von get für lvalues und rvalues prüfen explizit die Bedingung variant.index() != I gemäß [SWS_CORE_01613], [SWS_CORE_01614], [SWS_CORE_01615] und [SWS_CORE_01616]. Stimmt der Index nicht mit dem angeforderten Positionsindex I überein, wird abweichend von std::bad_variant_access die Verletzung IsoStdBadVariantAccessViolation ausgelöst. Ein vorheriger Abgleich mittels index() verhindert diesen fehlerhaften Zugriff zur Laufzeit.

Bezüglich der Nebenläufigkeit ist die Methode als const-Operation für nebenläufige Lesezugriffe auf denselben Variant sicher, solange keine konkurrierenden Modifikationen stattfinden; eine interne Synchronisation gegen parallele Schreibzugriffe dürfte nicht vorliegen. Frage Q-12e0dad0a6b8c5d0 (offen)

Dieser Text wurde von einer KI auf Basis der Spezifikation AUTOSAR R25-11 generiert.

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitexception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01665
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01665@rel:R25-11#efd439dd
Content hash
efd439dd
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01665
Status: valid/unmigrated Version: rel:R25-11#79f9fbbd Versionshistorie & Revisions (1 transition, 3 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_01665@rel:R25-11#79f9fbbd
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#efd439dd2026-09-30
  • R24-11rel:R24-11#50988c112026-10-14
  • R25-11rel:R25-11#79f9fbbd2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function operator= [SWS_CORE_01658]

constexpr Variant & operator= (const Variant &other) noexcept( {<cond-noexcept-8>});

As per corresponding usage in [variant] except for the following deviations: 1. Function is conditionally noexcept

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitconditionally exception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01658
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01658@rel:R25-11#e70fc86a
Content hash
e70fc86a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01658
Status: valid/unmigrated Version: rel:R25-11#9502ca1b Versionshistorie & Revisions (1 transition, 3 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_01658@rel:R25-11#9502ca1b
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#e70fc86a2026-09-30
  • R24-11rel:R24-11#9c37dac32026-10-14
  • R25-11rel:R25-11#9502ca1b2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function operator= [SWS_CORE_01659]

constexpr Variant & operator= (Variant &&other) noexcept( {<cond-noexcept-9>});

As per corresponding usage in [variant]

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitconditionally exception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01659
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01659@rel:R25-11#860115b4
Content hash
860115b4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01659
Status: valid/unmigrated Version: rel:R25-11#39ffdcbb Versionshistorie & Revisions (1 transition, 3 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_01659@rel:R25-11#39ffdcbb
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#860115b42026-09-30
  • R24-11rel:R24-11#a820e86d2026-10-14
  • R25-11rel:R25-11#39ffdcbb2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function operator= [SWS_CORE_01660]

template <typename T> Variant & operator= (T &&value) noexcept({<cond-noexcept-10>});

As per corresponding usage in [variant]

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitconditionally exception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01660
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01660@rel:R25-11#3ef1dc68
Content hash
3ef1dc68
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01660
Status: valid/unmigrated Version: rel:R25-11#255af730 Versionshistorie & Revisions (1 transition, 3 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_01660@rel:R25-11#255af730
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#3ef1dc682026-09-30
  • R24-11rel:R24-11#c43a33d12026-10-14
  • R25-11rel:R25-11#255af7302026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function swap [SWS_CORE_01667]

void swap (Variant &other) noexcept({<cond-noexcept-13>});

As per corresponding usage in [variant] except for the following deviations: 1. Conditions for the conditional exception safety are modified

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitconditionally exception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01667
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01667@rel:R25-11#1e70aeed
Content hash
1e70aeed
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01667
Status: valid/unmigrated Version: rel:R25-11#5ae6bafc Versionshistorie & Revisions (1 transition, 3 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_01667@rel:R25-11#5ae6bafc
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#1e70aeed2026-09-30
  • R24-11rel:R24-11#2a023e892026-10-14
  • R25-11rel:R25-11#5ae6bafc2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function valueless_by_exception [SWS_CORE_01666]

constexpr bool valueless_by_exception () const noexcept;

As per corresponding usage in [variant]

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 015c4319d2b5 Herkunft Offene Fragen (2)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Verwendung

Die Elementfunktion valueless_by_exception der Klasse ara::core::Variant wird im Modul core über die Header-Datei #include "ara/core/variant.h" bereitgestellt ([SWS_CORE_01666]). Entsprechend ihrer Signatur constexpr bool valueless_by_exception () const noexcept; erfordert sie keine Aufrufparameter und liefert synchron einen Wahrheitswert zurück ([SWS_CORE_01666]). Die funktionale Bedeutung richtet sich nach der üblichen Semantik von [variant] („As per corresponding usage in [variant]“) ([SWS_CORE_01666]). Interpretation: Der zurückgegebene Status true signalisiert dem Aufrufer vermutlich, dass eine vorherige Wertzuweisung oder Typänderung durch das Auftreten einer Ausnahme abgebrochen wurde und das Variant-Objekt daher temporär keinen gültigen Zustand repräsentiert. Frage Q-af7c00c7eb4ef5a1 (offen)

Fehlerbehandlung und Exception-Sicherheit

Hinsichtlich des Fehlerverhaltens ist die Methode als noexcept deklariert und formal als exception safe eingestuft ([SWS_CORE_01666]). Ein eigener Fehlerfall existiert bei der Abfrage nicht; die Funktion wirft keine C++-Exceptions ([SWS_CORE_01666]). Spezifische Fehlercodes, Rückmeldebeschreibungen oder Meldungen an Diagnose- und Fehlerüberwachungsinstanzen wie DET oder DEM sind für dieses Element nicht definiert ([SWS_CORE_01666]).

Nebenläufigkeit und Einschränkungen

Da valueless_by_exception als const- und constexpr-Methode spezifiziert ist, erfolgen während der Ausführung keinerlei modifizierende Zugriffe auf den internen Zustand des Objekts ([SWS_CORE_01666]). Interpretation: Gleichzeitige lesende Abfragen derselben Instanz aus mehreren Threads dürften ohne gesonderte Synchronisation sicher ausführbar sein, solange konkurrierende Schreiboperationen ausgeschlossen bleiben. Frage Q-5c28f8cef1c1f097 (offen)

Dieser Nutzungshinweis wurde automatisiert auf Basis von AUTOSAR R25-11 generiert.

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitexception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01666
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01666@rel:R25-11#3aa8f2a3
Content hash
3aa8f2a3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01666
Status: valid/unmigrated Version: rel:R25-11#172a8799 Versionshistorie & Revisions (1 transition, 3 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_01666@rel:R25-11#172a8799
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#3aa8f2a32026-09-30
  • R24-11rel:R24-11#d0913a2b2026-10-14
  • R25-11rel:R25-11#172a87992026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function ~Variant [SWS_CORE_01657]

~Variant () noexcept({<cond-noexcept-7>});

As per corresponding usage in [variant] except for the following deviations: 1. Function is conditionally noexcept

Header-Datei#include "ara/core/variant.h"
Scopeclass ara::core::Variant
Exception-Sicherheitconditionally exception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_01657
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01657@rel:R25-11#9a29a749
Content hash
9a29a749
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01657
Status: valid/unmigrated Version: rel:R25-11#00ac5736 Versionshistorie & Revisions (1 transition, 3 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_01657@rel:R25-11#00ac5736
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#9a29a7492026-09-30
  • R24-11rel:R24-11#7fdccbe62026-10-14
  • R25-11rel:R25-11#00ac57362026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill