DEENESPTFRRUARHIKOZHNL

class ara::core::Optional

[SWS_CORE_01033]

template <typename T> class Optional final {...};

Implementation of std::optional<T> type from [optional.syn]

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

User GuideAI-GENERATED

Encapsulates an optionally present value in a type-safe manner in stack memory and enables state-dependent access.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: b7fd51442c86 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Encapsulates an optionally present value in a type-safe manner in stack memory and enables state-dependent access.

The class ara::core::Optional provides a standard-compliant implementation of std::optional<T> to encapsulate values of type value_type in a type-safe and allocation-free manner on the stack [SWS_CORE_01102]. Applications check the engaged state via has_value() [SWS_CORE_01129] and access the content via value() or operators. Access to empty instances must be strictly avoided because, despite the noexcept declaration, it triggers the platform violation IsoStdBadOptionalAccessViolation [SWS_CORE_01131].

Context

The class ara::core::Optional provides a standard-compliant implementation of the container std::optional<T> for the Adaptive Platform. It serves as a type-safe wrapper for encapsulating an optional value of type value_type [SWS_CORE_01102]. Its use eliminates the need for error-prone sentinel values, special error flags, or dynamic memory allocations (such as null pointers) to denote absent data. The object is stored directly within the stack memory of the instance, thereby ensuring deterministic resource management and cache locality in the AUTOSAR runtime environment.

Lifecycle

An instance of ara::core::Optional is at any time in one of two discrete states: uninitialized (empty) or engaged with a value of type T. The empty initial state is entered via the default constructor [SWS_CORE_01103] or explicit initialization with nullopt_t [SWS_CORE_01104]. Initialization with a concrete value occurs either via copy and move constructors [SWS_CORE_01105], [SWS_CORE_01106], [SWS_CORE_01109], type-converting constructors [SWS_CORE_01110], [SWS_CORE_01111], or directly in-place via in_place_t [SWS_CORE_01107], [SWS_CORE_01108], completely avoiding temporary copies.

During runtime, the state can change multiple times: The methods emplace construct a new value directly in the memory of the object and discard any previously existing state [SWS_CORE_01119], [SWS_CORE_01120]. Likewise, assignment operators that are strictly bound to lvalues via ref-qualifiers & lead into the engaged state [SWS_CORE_01114], [SWS_CORE_01115], [SWS_CORE_01116], [SWS_CORE_01117], [SWS_CORE_01118]. Resetting to the empty state is performed deterministically via reset() [SWS_CORE_01136] or by assigning nullopt_t [SWS_CORE_01113]. Furthermore, two instances can efficiently swap their states and data contents via swap [SWS_CORE_01121]. Upon reaching the end of its life, the destructor destroys any contained object; its noexcept guarantee is directly linked to the destructibility of type T [SWS_CORE_01112].

optional_lifecycle Init Leer Leer Init->Leer Optional() / nullopt Belegt Belegt Init->Belegt Optional(Wert) / in_place Leer->Belegt emplace() / operator= Ende Ende Leer->Ende ~Optional() Belegt->Leer reset() / operator=(nullopt) Belegt->Belegt emplace() / operator= Belegt->Ende ~Optional()

State diagram: Lifecycle and state transitions of an instance of ara::core::Optional. Sources: [SWS_CORE_01103], [SWS_CORE_01104], [SWS_CORE_01107], [SWS_CORE_01113], [SWS_CORE_01119], [SWS_CORE_01136], [SWS_CORE_01112]

Usage Path

The regular flow comprises verification of engagement and subsequent retrieval of the value. For state queries, has_value() [SWS_CORE_01129] and the explicit conversion operator operator bool [SWS_CORE_01128] are available.

If a value is present, it can be accessed via the dereference operators operator* ([SWS_CORE_01124], [SWS_CORE_01125], [SWS_CORE_01126], [SWS_CORE_01127]) or operator-> ([SWS_CORE_01122], [SWS_CORE_01123]). Additionally, the method value() enables qualified access to lvalues and rvalues ([SWS_CORE_01130], [SWS_CORE_01131], [SWS_CORE_01132], [SWS_CORE_01133]). If a predefined replacement value is to be used in the absence of an engaged value, value_or provides a direct fallback strategy ([SWS_CORE_01134], [SWS_CORE_01135]). After processing is complete, the container can be cleared via reset() if required [SWS_CORE_01136].

Checking and accessing the optional valueApplicationOptionalhas_value()boolalthas_value() == truevalue()const T&has_value() == falsevalue_or(fallback)Treset()void

Sequence diagram: Flow for state check and value extraction. Sources: [SWS_CORE_01128], [SWS_CORE_01129], [SWS_CORE_01131], [SWS_CORE_01134], [SWS_CORE_01136]

Error Scenarios

An erroneous access occurs when an empty instance is dereferenced or its value is requested without authorization. The access methods value(), operator*, and operator-> are declared as noexcept in AUTOSAR Adaptive, but trigger the violation IsoStdBadOptionalAccessViolation in the empty state ([SWS_CORE_01122], [SWS_CORE_01123], [SWS_CORE_01124], [SWS_CORE_01125], [SWS_CORE_01126], [SWS_CORE_01127], [SWS_CORE_01130], [SWS_CORE_01131], [SWS_CORE_01132], [SWS_CORE_01133]). Interpretation: Since the methods are declared as noexcept, triggering the IsoStdBadOptionalAccessViolation is likely not propagated as a catchable standard exception, but presumably leads to immediate program termination via the platform-specific violation mechanism. Question Q-3c066dae2b93a9ec (open) Callers must therefore mandatorily validate the engagement state before reading.

Another error scenario concerns exception handling during type construction: Constructors, assignment operators, swap, and emplace have conditional noexcept specifications that depend on whether the corresponding type operations of T are themselves declared as noexcept ([SWS_CORE_01105], [SWS_CORE_01114], [SWS_CORE_01119], [SWS_CORE_01121]). The fallback method value_or is also explicitly designated as not exception safe (\"not exception safe\") ([SWS_CORE_01134], [SWS_CORE_01135]), so that errors occurring during the creation of the return value are passed on to the caller.

This class guide is based exclusively on the requirements of the ara::core::Optional specification from AUTOSAR Adaptive R25-11.

Member map

Class diagram

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

G nara__core__Optional627 Optional + Optional() + operator=() + ~Optional() + emplace() + reset() + swap() + has_value() + operator bool() + operator*() + operator->() + value() + value_or()

Detail view

Select an entry in the outline.

Constructors and destructor

Optional function 9

≙ [optional]

Overloads Optional 9
constexpr Optional () noexcept; SWS_CORE_01103
constexpr Optional (nullopt_t) noexcept; SWS_CORE_01104
constexpr Optional (const Optional &other) noexcept(std::is_nothrow_ copy_constructible< T >::value); SWS_CORE_01105
constexpr Optional (Optional &&other) noexcept(std::is_nothrow_move_ constructible< T >::value); SWS_CORE_01106
template <typename... Args> explicit constexpr Optional (in_place_t, Args &&...) noexcept(std::is_nothrow_constructible< T, Args... >::value); SWS_CORE_01107
template <typename U, typename... Args> explicit constexpr Optional (in_place_t, std::initializer_list< U >, Args &&...) noexcept(std::is_nothrow_constructible< T, std::initializer_list< U > &, Args &&... >::value); SWS_CORE_01108
template <typename U = T> {<cond-explicit-1>} constexpr Optional (U &&) noexcept(std::is_ nothrow_constructible< T, U >::value); SWS_CORE_01109
template <typename U> {<cond-explicit-2>} Optional (const Optional< U > &) noexcept(std::is_ nothrow_constructible< T, const U & >::value); SWS_CORE_01110
template <typename U> {<cond-explicit-3>} Optional (Optional< U > &&) noexcept(std::is_ nothrow_constructible< T, U >::value); SWS_CORE_01111
~Optional function

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

~Optional () noexcept(std::is_nothrow_destructible< T >::value);

Methods

emplace function 2

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

Overloads emplace 2
template <typename... Args> T & emplace (Args &&...) noexcept(std::is_nothrow_constructible< T, Args &&... >::value); SWS_CORE_01119
template <typename U, typename... Args> T & emplace (std::initializer_list< U >, Args &&...) noexcept(std::is_nothrow_constructible< T, std::initializer_list< U > &, Args &&... >::value); SWS_CORE_01120
has_value function

≙ [optional]

constexpr bool has_value () const noexcept;
reset function

≙ [optional]

void reset () noexcept;
swap function

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

void swap (Optional &) noexcept(std::is_nothrow_move_constructible< T >::value &&std::is_nothrow_move_assignable< T >::value);
value function 4

except for the following deviations: 1. The function is noexcept 2. A IsoStdBadOptionalAccessViolation may conditionally be raised (see condition) ≙ [optional]

Overloads value 4
constexpr const T & value () const & noexcept; SWS_CORE_01130
constexpr T & value () & noexcept; SWS_CORE_01131
constexpr T && value () &&noexcept; SWS_CORE_01132
constexpr const T && value () const &&noexcept; SWS_CORE_01133
value_or function 2

≙ [optional]

Overloads value_or 2
template <typename U> constexpr T value_or (U &&) const &; SWS_CORE_01134
template <typename U> constexpr T value_or (U &&) &&; SWS_CORE_01135

Operators

operator bool function

≙ [optional]

explicit constexpr operator bool () const noexcept;
operator* function 4

except for the following deviations: 1. The function is noexcept 2. A IsoStdBadOptionalAccessViolation may conditionally be raised (see condition) ≙ [optional]

Overloads * 4
constexpr const T & operator* () const & noexcept; SWS_CORE_01124
constexpr T & operator* () & noexcept; SWS_CORE_01125
constexpr T && operator* () &&noexcept; SWS_CORE_01126
constexpr const T && operator* () const &&noexcept; SWS_CORE_01127
operator-> function 2

except for the following deviations: 1. The function is noexcept 2. Function is not constexpr 3. A IsoStdBadOptionalAccessViolation may be raised (see condition) ≙ [optional]

Overloads -> 2
const T * operator-> () const noexcept; SWS_CORE_01122
T * operator-> () noexcept; SWS_CORE_01123
operator= function 6

≙ [optional]

Overloads = 6
Optional & operator= (nullopt_t) & noexcept; SWS_CORE_01113
Optional & operator= (const Optional &other) &noexcept(std::is_ nothrow_copy_constructible< T >::value &&std::is_nothrow_copy_ assignable< T >::value); SWS_CORE_01114
template <typename U = T> Optional & operator= (U &&u) &noexcept(std::is_nothrow_constructible< T, U >::value &&std::is_nothrow_assignable< T &, U >::value); SWS_CORE_01116
template <typename U> Optional & operator= (const Optional< U > &) &noexcept(std::is_ nothrow_constructible< T, const U &>::value &&std::is_nothrow_ assignable< T &, const U &>::value); SWS_CORE_01117
template <typename U> Optional & operator= (Optional< U > &&) &noexcept(std::is_nothrow_ constructible< T, U >::value &&std::is_nothrow_assignable< T &, U >::value); SWS_CORE_01118

Type aliases

value_type type alias

≙ [optional]

using value_type = T;

Method documentation

function Optional [SWS_CORE_01103]

constexpr Optional () noexcept;

As per corresponding usage in [optional]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01103
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01103@rel:R25-11#d86867a0
Content hash
d86867a0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01103
Status: valid/unmigrated Version: rel:R25-11#8992786d 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_01103@rel:R25-11#8992786d
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#d86867a02026-09-30
  • R24-11rel:R24-11#86df07de2026-10-14
  • R25-11rel:R25-11#8992786d2026-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 Optional [SWS_CORE_01104]

constexpr Optional (nullopt_t) noexcept;

As per corresponding usage in [optional]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01104
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01104@rel:R25-11#e84841e9
Content hash
e84841e9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01104
Status: valid/unmigrated Version: rel:R25-11#411bd18e 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_01104@rel:R25-11#411bd18e
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#e84841e92026-09-30
  • R24-11rel:R24-11#43c232942026-10-14
  • R25-11rel:R25-11#411bd18e2026-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 Optional [SWS_CORE_01105]

constexpr Optional (const Optional &other) noexcept(std::is_nothrow_ copy_constructible< T >::value);

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01105
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01105@rel:R25-11#0af1e179
Content hash
0af1e179
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01105
Status: valid/unmigrated Version: rel:R25-11#85a53092 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_01105@rel:R25-11#85a53092
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#0af1e1792026-09-30
  • R24-11rel:R24-11#2865a5e92026-10-14
  • R25-11rel:R25-11#85a530922026-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 Optional [SWS_CORE_01106]

constexpr Optional (Optional &&other) noexcept(std::is_nothrow_move_ constructible< T >::value);

As per corresponding usage in [optional]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01106
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01106@rel:R25-11#a9088f02
Content hash
a9088f02
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01106
Status: valid/unmigrated Version: rel:R25-11#5420cc51 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_01106@rel:R25-11#5420cc51
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#a9088f022026-09-30
  • R24-11rel:R24-11#ded734802026-10-14
  • R25-11rel:R25-11#5420cc512026-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 Optional [SWS_CORE_01107]

template <typename... Args> explicit constexpr Optional (in_place_t, Args &&...) noexcept(std::is_nothrow_constructible< T, Args... >::value);

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01107
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01107@rel:R25-11#4f8cb42a
Content hash
4f8cb42a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01107
Status: valid/unmigrated Version: rel:R25-11#0d478adc 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_01107@rel:R25-11#0d478adc
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#4f8cb42a2026-09-30
  • R24-11rel:R24-11#d6033a2e2026-10-14
  • R25-11rel:R25-11#0d478adc2026-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 Optional [SWS_CORE_01108]

template <typename U, typename... Args> explicit constexpr Optional (in_place_t, std::initializer_list< U >, Args &&...) noexcept(std::is_nothrow_constructible< T, std::initializer_list< U > &, Args &&... >::value);

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01108
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01108@rel:R25-11#7769d619
Content hash
7769d619
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01108
Status: valid/unmigrated Version: rel:R25-11#25dbc842 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_01108@rel:R25-11#25dbc842
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#7769d6192026-09-30
  • R24-11rel:R24-11#030018c92026-10-14
  • R25-11rel:R25-11#25dbc8422026-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 Optional [SWS_CORE_01109]

template <typename U = T> {<cond-explicit-1>} constexpr Optional (U &&) noexcept(std::is_ nothrow_constructible< T, U >::value);

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

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: a319ba530534 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The constructor function [SWS_CORE_01109] of class ara::core::Optional is provided via header #include "ara/core/optional.h". As a template constructor with signature template <typename U = T> constexpr Optional(U&&), it serves to directly initialize an optional value while forwarding the argument of type U&& to the contained value type T ([SWS_CORE_01102]). The semantics follow the definition in [optional], but deviate through an explicit condition for exception freedom: The function is specified as noexcept if and only if std::is_nothrow_constructible<T, U>::value is satisfied ([SWS_CORE_01109]).

Error Handling and Exception Safety

With respect to exception safety, the call is classified as conditionally exception safe ([SWS_CORE_01109]). Specific AUTOSAR error codes and reporting channels via DET or DEM do not exist for this constructor; if construction of the target type T fails, the corresponding exception of the type is forwarded.

Interaction and Concurrency

The function stands alongside the default constructor [SWS_CORE_01103] and the null constructor [SWS_CORE_01104], which create empty instances, as well as the copy and move constructors [SWS_CORE_01105] and [SWS_CORE_01106]. Furthermore, ara::core::Optional serves as a carrier for optional return values in the error handling of ara::core::Result, for example when retrieving values via Ok() ([SWS_CORE_00770]) or errors via Err() ([SWS_CORE_00772]). Interpretation: In the absence of explicit thread-safety commitments in [SWS_CORE_01109], concurrent invocation of the constructor is likely safe only if the source object U is protected against simultaneous modifications. Question Q-edf541fe968f3afe (open)

This usage note was generated automatically. The authoritative reference is the AUTOSAR specification.

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01109
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01109@rel:R25-11#5e482bc6
Content hash
5e482bc6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01109
Status: valid/unmigrated Version: rel:R25-11#7558e4db 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_01109@rel:R25-11#7558e4db
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#5e482bc62026-09-30
  • R24-11rel:R24-11#8a9b95052026-10-14
  • R25-11rel:R25-11#7558e4db2026-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 Optional [SWS_CORE_01110]

template <typename U> {<cond-explicit-2>} Optional (const Optional< U > &) noexcept(std::is_ nothrow_constructible< T, const U & >::value);

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

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: dd45cef6ee33 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The converting copy constructor of ara::core::Optional is available via header file #include "ara/core/optional.h" [SWS_CORE_01110]. It serves to synchronously create a Optional<T> from an existing instance const Optional<U>&. The specification tag {<cond-explicit-2>} likely indicates that the constructor is declared as explicit provided that T cannot be constructed implicitly from const U&. Question Q-4a4adc2b59d1fa53 (open)

Error Handling and Exception Safety

No specific error codes, DET, or DEM notifications exist for this constructor. The function is classified as conditionally exception-safe (conditionally exception safe) [SWS_CORE_01110]. The noexcept guarantee takes effect via noexcept(std::is_nothrow_constructible<T, const U&>::value) exclusively when the target type T is constructible without exceptions from const U& [SWS_CORE_01110]. If creation of the target value fails, exceptions propagate unchanged.

Concurrency and Limitations

In contrast to other functions such as Ok() [SWS_CORE_00770], the specification does not identify thread safety for this constructor. While it is likely reentrant, concurrent read or write access to the source object Optional<U> requires external synchronization. Question Q-a0534498f685f575 (open)

Interaction

The constructor complements the other initialization functions of ara::core::Optional, including default, null, and copy constructors ([SWS_CORE_01103], [SWS_CORE_01104], [SWS_CORE_01105], [SWS_CORE_01106]) as well as the swap operation [SWS_CORE_01096]. In addition, the type interacts closely with ara::core::Result, whose methods Ok() and Err() expose values or errors as Optional ([SWS_CORE_00770], [SWS_CORE_00772]).

This text was generated by an AI based on the AUTOSAR specification R25-11.

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01110
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01110@rel:R25-11#f7b346cb
Content hash
f7b346cb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01110
Status: valid/unmigrated Version: rel:R25-11#11b08505 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_01110@rel:R25-11#11b08505
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#f7b346cb2026-09-30
  • R24-11rel:R24-11#a18434152026-10-14
  • R25-11rel:R25-11#11b085052026-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 Optional [SWS_CORE_01111]

template <typename U> {<cond-explicit-3>} Optional (Optional< U > &&) noexcept(std::is_ nothrow_constructible< T, U >::value);

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

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 5e86b0752dce Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The template function [SWS_CORE_01111] provides the converting move constructor of class ara::core::Optional from header file #include "ara/core/optional.h". It accepts an rvalue reference Optional<U>&& to initialize an instance of Optional<T> and follows the behavior of [optional] with the documented deviation of a conditional noexcept specification [SWS_CORE_01111]. Specification clause {<cond-explicit-3>}, as an interpretation, is likely to control whether the conversion occurs implicitly or explicitly depending on the properties of types T and U. Question Q-0b21a6eafb9414d8 (open)

With respect to error handling and exception handling, the constructor is classified as conditionally exception-safe (conditionally exception safe) [SWS_CORE_01111]. Execution is noexcept if and only if std::is_nothrow_constructible<T, U>::value is satisfied [SWS_CORE_01111]. Otherwise, exceptions may occur during construction of the contained value and be propagated to the caller.

Within ara::core::Optional, this function complements the regular move constructor [SWS_CORE_01106], the copy constructor [SWS_CORE_01105], and the default constructor [SWS_CORE_01103]. In addition, the element interacts closely with ara::core::Result, whose methods Ok() and Err() return contained values or errors as ara::core::Optional (as in [SWS_CORE_00770], [SWS_CORE_00771], and [SWS_CORE_00772]), as well as with the helper function swap [SWS_CORE_01096].

This usage note was generated automatically based on specification data.

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01111
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01111@rel:R25-11#60888d08
Content hash
60888d08
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01111
Status: valid/unmigrated Version: rel:R25-11#9d33a7e6 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_01111@rel:R25-11#9d33a7e6
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#60888d082026-09-30
  • R24-11rel:R24-11#1297b71f2026-10-14
  • R25-11rel:R25-11#9d33a7e62026-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_01119]

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

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

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 4b99ff09898e Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The member function emplace of class ara::core::Optional serves to construct the contained value of type T directly in the memory of the optional object [SWS_CORE_01119]. The call is performed synchronously via the header file ara/core/optional.h. As a parameter, the function takes a variadic argument pack Args&&... and forwards it to the constructor of type T; an lvalue reference to the newly constructed value (T&) is returned [SWS_CORE_01119].

Regarding exception handling, the function is classified as conditionally exception safe (conditionally exception safe) and has a conditional noexcept specification based on std::is_nothrow_constructible<T, Args&&...>::value [SWS_CORE_01119]. If the construction of T throws an exception, the exception safety of the underlying type applies; a noexcept guarantee holds exclusively if the construction is guaranteed not to throw exceptions. Specific error codes, DEM events, or DET notifications are not provided in the specification [SWS_CORE_01119].

Regarding concurrency, the specification is silent; Interpretation: Simultaneous write access by multiple threads to the same instance of ara::core::Optional is likely not thread-safe without external synchronization. Question Q-c11efb3f95001493 (open) In addition, any previously existing value is likely destroyed upon re-initialization.

In the interaction within ara::core::Optional, alternative overloads exist: For initializer lists, a variant with std::initializer_list is available [SWS_CORE_01120], while a dedicated overload is defined for reference types ara::core::Optional<T&> [SWS_CORE_01164]. Similar emplace mechanisms for in-place construction also exist in module core for containers such as ara::core::Vector [SWS_CORE_01366], ara::core::Map [SWS_CORE_01458], and ara::core::Variant [SWS_CORE_01661], [SWS_CORE_01662], [SWS_CORE_01663], [SWS_CORE_01664].

This text was generated by an AI based on the AUTOSAR specification R25-11.

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01119
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01119@rel:R25-11#957655d8
Content hash
957655d8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01119
Status: valid/unmigrated Version: rel:R25-11#a1151217 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_01119@rel:R25-11#a1151217
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#957655d82026-09-30
  • R24-11rel:R24-11#fb1be5602026-10-14
  • R25-11rel:R25-11#a11512172026-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_01120]

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

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

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: a5f272ff8d2c Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The member function emplace from [SWS_CORE_01120] serves to initialize the contained value of an object of type ara::core::Optional directly in place. It accepts an std::initializer_list<U> as well as optional arguments Args&&... and returns a reference T& to the newly created value.

Regarding error handling and exception safety, the function is specified as conditionally exception safe (conditionally exception safe). According to [SWS_CORE_01120], the noexcept condition depends exactly on whether the target type T can be constructed without exceptions using the std::initializer_list<U>& and the forwarding arguments (std::is_nothrow_constructible). This represents an explicit deviation from the behavior in standard [optional].

In conjunction with the core components, this overload complements the generic in-place construction without an initializer list from [SWS_CORE_01119]. For reference specializations, assignment via [SWS_CORE_01164] also exists. Interpretation: As is customary with the standard counterpart in [optional], if a prior value is present, it is likely destroyed prior to the new construction. Question Q-b8a9274e43f0a0a9 (open)

This usage note was generated automatically and is based on the requirements of the specification.

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01120
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01120@rel:R25-11#a140351c
Content hash
a140351c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01120
Status: valid/unmigrated Version: rel:R25-11#19e525e9 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_01120@rel:R25-11#19e525e9
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#a140351c2026-09-30
  • R24-11rel:R24-11#d59521372026-10-14
  • R25-11rel:R25-11#19e525e92026-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 has_value [SWS_CORE_01129]

constexpr bool has_value () const noexcept;

As per corresponding usage in [optional]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01129
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01129@rel:R25-11#9f849c3e
Content hash
9f849c3e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01129
Status: valid/unmigrated Version: rel:R25-11#7383a7bc 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_01129@rel:R25-11#7383a7bc
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#9f849c3e2026-09-30
  • R24-11rel:R24-11#796326bb2026-10-14
  • R25-11rel:R25-11#7383a7bc2026-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 bool [SWS_CORE_01128]

explicit constexpr operator bool () const noexcept;

As per corresponding usage in [optional]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01128
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01128@rel:R25-11#109a619b
Content hash
109a619b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01128
Status: valid/unmigrated Version: rel:R25-11#cf39bd07 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_01128@rel:R25-11#cf39bd07
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#109a619b2026-09-30
  • R24-11rel:R24-11#b5a26c7d2026-10-14
  • R25-11rel:R25-11#cf39bd072026-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_01124]

constexpr const T & operator* () const & noexcept;

As per corresponding usage in [optional] except for the following deviations: 1. The function is noexcept 2. A IsoStdBadOptionalAccessViolation may conditionally be raised (see condition)

Header-Datei#include "ara/core/optional.h"
Scopeclass ara::core::Optional
Exception-Sicherheitexception safe
Verletzungen (Violations)IsoStdBadOption- If *this does not contain a value alAccessViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_01124
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01124@rel:R25-11#72e800a6
Content hash
72e800a6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01124
Status: valid/unmigrated Version: rel:R25-11#6c6d6246 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_01124@rel:R25-11#6c6d6246
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#72e800a62026-09-30
  • R24-11rel:R24-11#6ba741822026-10-14
  • R25-11rel:R25-11#6c6d62462026-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_01125]

constexpr T & operator* () & noexcept;

As per corresponding usage in [optional] except for the following deviations: 1. The function is noexcept 2. A IsoStdBadOptionalAccessViolation may conditionally be raised (see condition)

Header-Datei#include "ara/core/optional.h"
Scopeclass ara::core::Optional
Exception-Sicherheitexception safe
Verletzungen (Violations)IsoStdBadOption- If *this does not contain a value alAccessViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_01125
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01125@rel:R25-11#50b8d133
Content hash
50b8d133
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01125
Status: valid/unmigrated Version: rel:R25-11#bbff2175 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_01125@rel:R25-11#bbff2175
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#50b8d1332026-09-30
  • R24-11rel:R24-11#da1307272026-10-14
  • R25-11rel:R25-11#bbff21752026-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_01126]

constexpr T && operator* () &&noexcept;

As per corresponding usage in [optional] except for the following deviations: 1. The function is noexcept 2. A IsoStdBadOptionalAccessViolation may conditionally be raised (see condition)

Header-Datei#include "ara/core/optional.h"
Scopeclass ara::core::Optional
Exception-Sicherheitexception safe
Verletzungen (Violations)IsoStdBadOption- If *this does not contain a value alAccessViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_01126
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01126@rel:R25-11#e9500507
Content hash
e9500507
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01126
Status: valid/unmigrated Version: rel:R25-11#eb9c6afb 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_01126@rel:R25-11#eb9c6afb
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#e95005072026-09-30
  • R24-11rel:R24-11#6c670b852026-10-14
  • R25-11rel:R25-11#eb9c6afb2026-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_01127]

constexpr const T && operator* () const &&noexcept;

As per corresponding usage in [optional] except for the following deviations: 1. The function is noexcept 2. A IsoStdBadOptionalAccessViolation may conditionally be raised (see condition)

Header-Datei#include "ara/core/optional.h"
Scopeclass ara::core::Optional
Exception-Sicherheitexception safe
Verletzungen (Violations)IsoStdBadOption- If *this does not contain a value alAccessViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_01127
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01127@rel:R25-11#930319d5
Content hash
930319d5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01127
Status: valid/unmigrated Version: rel:R25-11#0c38bfb2 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_01127@rel:R25-11#0c38bfb2
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#930319d52026-09-30
  • R24-11rel:R24-11#d6b67a322026-10-14
  • R25-11rel:R25-11#0c38bfb22026-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_01122]

const T * operator-> () const noexcept;

As per corresponding usage in [optional] except for the following deviations: 1. The function is noexcept 2. Function is not constexpr 3. A IsoStdBadOptionalAccessViolation may be raised (see condition)

Header-Datei#include "ara/core/optional.h"
Scopeclass ara::core::Optional
Exception-Sicherheitexception safe
Verletzungen (Violations)IsoStdBadOption- If *this does not contain a value alAccessViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_01122
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01122@rel:R25-11#dede9c81
Content hash
dede9c81
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01122
Status: valid/unmigrated Version: rel:R25-11#a0430001 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_01122@rel:R25-11#a0430001
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#dede9c812026-09-30
  • R24-11rel:R24-11#33bcccf02026-10-14
  • R25-11rel:R25-11#a04300012026-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_01123]

T * operator-> () noexcept;

As per corresponding usage in [optional] except for the following deviations: 1. The function is noexcept 2. Function is not constexpr 3. A IsoStdBadOptionalAccessViolation may be raised (see condition)

Header-Datei#include "ara/core/optional.h"
Scopeclass ara::core::Optional
Exception-Sicherheitexception safe
Verletzungen (Violations)IsoStdBadOption- If *this does not contain a value alAccessViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_01123
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01123@rel:R25-11#c2d8053b
Content hash
c2d8053b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01123
Status: valid/unmigrated Version: rel:R25-11#e18dd6ba 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_01123@rel:R25-11#e18dd6ba
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#c2d8053b2026-09-30
  • R24-11rel:R24-11#1d6944b82026-10-14
  • R25-11rel:R25-11#e18dd6ba2026-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_01113]

Optional & operator= (nullopt_t) & noexcept;

As per corresponding usage in [optional]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01113
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01113@rel:R25-11#f2640056
Content hash
f2640056
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01113
Status: valid/unmigrated Version: rel:R25-11#18fcf54f 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_01113@rel:R25-11#18fcf54f
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#f26400562026-09-30
  • R24-11rel:R24-11#f4403dc22026-10-14
  • R25-11rel:R25-11#18fcf54f2026-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_01114]

Optional & operator= (const Optional &other) &noexcept(std::is_ nothrow_copy_constructible< T >::value &&std::is_nothrow_copy_ assignable< T >::value);

As per corresponding usage in [optional] except for the following deviations: 1. Function is conditionally noexcept 2. Function is declared with the ref-qualifier &

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01114
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01114@rel:R25-11#53d12502
Content hash
53d12502
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01114
Status: valid/unmigrated Version: rel:R25-11#6ca0c9a7 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_01114@rel:R25-11#6ca0c9a7
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#53d125022026-09-30
  • R24-11rel:R24-11#d36bd1ce2026-10-14
  • R25-11rel:R25-11#6ca0c9a72026-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_01115]

Optional & operator= (Optional &&other) &noexcept(std::is_nothrow_ move_assignable< T >::value &&std::is_nothrow_move_constructible< T >::value);

As per corresponding usage in [optional] except for the following deviations: 1. Function is declared with the ref-qualifier &

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01115
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01115@rel:R25-11#f4c255c1
Content hash
f4c255c1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01115
Status: valid/unmigrated Version: rel:R25-11#16e267f2 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_01115@rel:R25-11#16e267f2
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#f4c255c12026-09-30
  • R24-11rel:R24-11#6bfd4afd2026-10-14
  • R25-11rel:R25-11#16e267f22026-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_01116]

template <typename U = T> Optional & operator= (U &&u) &noexcept(std::is_nothrow_constructible< T, U >::value &&std::is_nothrow_assignable< T &, U >::value);

As per corresponding usage in [optional] except for the following deviations: 1. Function is conditionally noexcept 2. Function is declared with the ref-qualifier &

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01116
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01116@rel:R25-11#be342f91
Content hash
be342f91
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01116
Status: valid/unmigrated Version: rel:R25-11#3e4d73de 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_01116@rel:R25-11#3e4d73de
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#be342f912026-09-30
  • R24-11rel:R24-11#3fce07582026-10-14
  • R25-11rel:R25-11#3e4d73de2026-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_01117]

template <typename U> Optional & operator= (const Optional< U > &) &noexcept(std::is_ nothrow_constructible< T, const U &>::value &&std::is_nothrow_ assignable< T &, const U &>::value);

As per corresponding usage in [optional] except for the following deviations: 1. Function is conditionally noexcept 2. Function is declared with the ref-qualifier &

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01117
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01117@rel:R25-11#68ae4d39
Content hash
68ae4d39
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01117
Status: valid/unmigrated Version: rel:R25-11#d5d06ba9 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_01117@rel:R25-11#d5d06ba9
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#68ae4d392026-09-30
  • R24-11rel:R24-11#a7a5f0f32026-10-14
  • R25-11rel:R25-11#d5d06ba92026-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_01118]

template <typename U> Optional & operator= (Optional< U > &&) &noexcept(std::is_nothrow_ constructible< T, U >::value &&std::is_nothrow_assignable< T &, U >::value);

As per corresponding usage in [optional] except for the following deviations: 1. Function is conditionally noexcept 2. Function is declared with the ref-qualifier &

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01118
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01118@rel:R25-11#615224ed
Content hash
615224ed
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01118
Status: valid/unmigrated Version: rel:R25-11#083436fb 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_01118@rel:R25-11#083436fb
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#615224ed2026-09-30
  • R24-11rel:R24-11#bc5224af2026-10-14
  • R25-11rel:R25-11#083436fb2026-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 reset [SWS_CORE_01136]

void reset () noexcept;

As per corresponding usage in [optional]

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: e8663f9a82ee Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The member function reset of class ara::core::Optional is provided via the header #include "ara/core/optional.h" and serves to reset an instance [SWS_CORE_01136]. The function has the signature void reset () noexcept;, takes no parameters, and provides no return value [SWS_CORE_01136]. Its behavior follows the corresponding usage in [optional] [SWS_CORE_01136]; Interpretation: Based on this reference, the call is likely to destroy any state value present and transition the instance into a disengaged state. Question Q-c819444ae1a7df1f (open)

Regarding error handling and exception safety, reset is declared as exception-safe (exception safe) and with the identifier noexcept [SWS_CORE_01136]. Neither exceptions are thrown nor error codes are returned [SWS_CORE_01136].

In interaction with other components of the Core library, the following relations are relevant:

  • For optional references ara::core::Optional<T&>, an overload of reset specified as constexpr is available, which is also noexcept and exception-safe [SWS_CORE_01165].
  • In distinction to Optional, the type ara::core::Bitset in header ara/core/bitset.h also offers reset functions: a parameterless variant that references the modified bitset [SWS_CORE_01727], as well as a position-based overload with Result return and check for IsoStdOutOfRangeViolation [SWS_CORE_01728].

This text was generated automatically. All statements are based on the specification scope of AUTOSAR Adaptive R25-11.

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01136
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01136@rel:R25-11#bde8a7be
Content hash
bde8a7be
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01136
Status: valid/unmigrated Version: rel:R25-11#6d9fb635 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_01136@rel:R25-11#6d9fb635
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#bde8a7be2026-09-30
  • R24-11rel:R24-11#4d4a35c12026-10-14
  • R25-11rel:R25-11#6d9fb6352026-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_01121]

void swap (Optional &) noexcept(std::is_nothrow_move_constructible< T >::value &&std::is_nothrow_move_assignable< T >::value);

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01121
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01121@rel:R25-11#f13812c0
Content hash
f13812c0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01121
Status: valid/unmigrated Version: rel:R25-11#ec32d4dd 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_01121@rel:R25-11#ec32d4dd
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#f13812c02026-09-30
  • R24-11rel:R24-11#6c6900ce2026-10-14
  • R25-11rel:R25-11#ec32d4dd2026-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 value [SWS_CORE_01130]

constexpr const T & value () const & noexcept;

As per corresponding usage in [optional] except for the following deviations: 1. The function is noexcept 2. A IsoStdBadOptionalAccessViolation may conditionally be raised (see condition)

Header-Datei#include "ara/core/optional.h"
Scopeclass ara::core::Optional
Exception-Sicherheitexception safe
Verletzungen (Violations)IsoStdBadOption- If *this does not contain a value alAccessViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_01130
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01130@rel:R25-11#d33dc715
Content hash
d33dc715
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01130
Status: valid/unmigrated Version: rel:R25-11#f3e37107 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_01130@rel:R25-11#f3e37107
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#d33dc7152026-09-30
  • R24-11rel:R24-11#dd5d01932026-10-14
  • R25-11rel:R25-11#f3e371072026-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 value [SWS_CORE_01131]

constexpr T & value () & noexcept;

As per corresponding usage in [optional] except for the following deviations: 1. The function is noexcept 2. A IsoStdBadOptionalAccessViolation may conditionally be raised (see condition)

Header-Datei#include "ara/core/optional.h"
Scopeclass ara::core::Optional
Exception-Sicherheitexception safe
Verletzungen (Violations)IsoStdBadOption- If *this does not contain a value alAccessViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_01131
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01131@rel:R25-11#68af222c
Content hash
68af222c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01131
Status: valid/unmigrated Version: rel:R25-11#bd11e736 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_01131@rel:R25-11#bd11e736
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#68af222c2026-09-30
  • R24-11rel:R24-11#3d037a0d2026-10-14
  • R25-11rel:R25-11#bd11e7362026-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 value [SWS_CORE_01132]

constexpr T && value () &&noexcept;

As per corresponding usage in [optional] except for the following deviations: 1. The function is noexcept 2. A IsoStdBadOptionalAccessViolation may conditionally be raised (see condition)

Header-Datei#include "ara/core/optional.h"
Scopeclass ara::core::Optional
Exception-Sicherheitexception safe
Verletzungen (Violations)IsoStdBadOption- If *this does not contain a value alAccessViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_01132
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01132@rel:R25-11#414433c4
Content hash
414433c4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01132
Status: valid/unmigrated Version: rel:R25-11#24f00cb3 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_01132@rel:R25-11#24f00cb3
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#414433c42026-09-30
  • R24-11rel:R24-11#2e6187fb2026-10-14
  • R25-11rel:R25-11#24f00cb32026-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 value [SWS_CORE_01133]

constexpr const T && value () const &&noexcept;

As per corresponding usage in [optional] except for the following deviations: 1. The function is noexcept 2. A IsoStdBadOptionalAccessViolation may conditionally be raised (see condition)

Header-Datei#include "ara/core/optional.h"
Scopeclass ara::core::Optional
Exception-Sicherheitexception safe
Verletzungen (Violations)IsoStdBadOption- If *this does not contain a value alAccessViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_01133
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01133@rel:R25-11#54a5ac7f
Content hash
54a5ac7f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01133
Status: valid/unmigrated Version: rel:R25-11#7b7d6eb7 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_01133@rel:R25-11#7b7d6eb7
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#54a5ac7f2026-09-30
  • R24-11rel:R24-11#f020185a2026-10-14
  • R25-11rel:R25-11#7b7d6eb72026-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 value_or [SWS_CORE_01134]

template <typename U> constexpr T value_or (U &&) const &;

As per corresponding usage in [optional]

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 4420db92e204 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The template member function value_or of class ara::core::Optional according to [SWS_CORE_01134] serves to synchronously retrieve the contained value or a provided fallback value. It is included via the header #include "ara/core/optional.h" and is declared with the signature template <typename U> constexpr T value_or (U &&) const &; as a const lvalue reference method. The behavior complies with the corresponding definition of std::optional ("As per corresponding usage in [optional]"), whereby the value T is returned if content is set, and the passed default value is returned otherwise.

Error Handling and Exception Safety

Regarding error handling, the function according to [SWS_CORE_01134] is explicitly specified as not exception-safe ("not exception safe"). Error codes, DET, or DEM messages are not provided for this call. Exceptions thrown during conversion or copy operations can thus propagate to the outside.

Interaction

Within ara::core::Optional, complementary overloads of value_or exist:

  • [SWS_CORE_01135] provides the rvalue overload template <typename U> constexpr T value_or (U &&) &&;, which is likewise declared as not exception-safe ("not exception safe") and enables optimized moving for temporary objects.
  • [SWS_CORE_01175] specifies the overload for the specialization ara::core::Optional<T&> with the signature template <typename U> constexpr T value_or (U &&u) const noexcept;, which, in contrast to [SWS_CORE_01134], is marked as exception-safe ("exception safe").

This usage note was generated automatically and is based exclusively on the specification data of AUTOSAR Release R25-11.

Header-Datei#include "ara/core/optional.h"
Scopeclass ara::core::Optional
Exception-Sicherheitnot exception safe

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

Record
AUTOSAR/AP/record/SWS_CORE_01134
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01134@rel:R25-11#60f23a90
Content hash
60f23a90
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01134
Status: valid/unmigrated Version: rel:R25-11#7c04631e 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_01134@rel:R25-11#7c04631e
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#60f23a902026-09-30
  • R24-11rel:R24-11#75fa1c852026-10-14
  • R25-11rel:R25-11#7c04631e2026-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 value_or [SWS_CORE_01135]

template <typename U> constexpr T value_or (U &&) &&;

As per corresponding usage in [optional]

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 1f9eb2809808 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The rvalue-qualified member function value_or of the template class ara::core::Optional is provided via the header file ara/core/optional.h [SWS_CORE_01135]. According to the reference to [optional], it serves to query the contained value synchronously or to return a passed replacement value. Since this call is bound to rvalue references, the contained value is presumably transferred via move semantics if a value is present; otherwise, the passed argument is evaluated and converted. Question Q-e20f155d58dd0d72 (open)

Interplay and overloads

The function complements the const lvalue overload [SWS_CORE_01134], which provides the same fallback mechanism for long-lived or non-temporary instances. For specializations on references ara::core::Optional<T &>, a signature declared as noexcept exists deviatingly [SWS_CORE_01175], whereas the general overload is intended for rvalues of value types.

Error Handling and Exception Safety

The method is explicitly declared as not exception safe [SWS_CORE_01135]. Specific error codes, DET, or DEM messages do not exist. Interpretation: Potential exceptions are likely to originate primarily from move constructors or conversion operators of the involved types T and U, provided that errors occur during the creation of the return value. Question (open)

This text was created by an AI and is based exclusively on the specifications of release R25-11.

Header-Datei#include "ara/core/optional.h"
Scopeclass ara::core::Optional
Exception-Sicherheitnot exception safe

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

Record
AUTOSAR/AP/record/SWS_CORE_01135
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01135@rel:R25-11#4e564dbd
Content hash
4e564dbd
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01135
Status: valid/unmigrated Version: rel:R25-11#b12481cc 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_01135@rel:R25-11#b12481cc
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#4e564dbd2026-09-30
  • R24-11rel:R24-11#e796ceb42026-10-14
  • R25-11rel:R25-11#b12481cc2026-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 ~Optional [SWS_CORE_01112]

~Optional () noexcept(std::is_nothrow_destructible< T >::value);

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01112
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01112@rel:R25-11#d0e776bc
Content hash
d0e776bc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01112
Status: valid/unmigrated Version: rel:R25-11#28cb7e57 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_01112@rel:R25-11#28cb7e57
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#d0e776bc2026-09-30
  • R24-11rel:R24-11#56a370392026-10-14
  • R25-11rel:R25-11#28cb7e572026-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

Type alias documentation

type alias value_type [SWS_CORE_01102]

using value_type = T;

As per corresponding usage in [optional]

Header-Datei#include "ara/core/optional.h"
Scopeclass ara::core::Optional
Symbolvalue_type

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

Record
AUTOSAR/AP/record/SWS_CORE_01102
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01102@rel:R25-11#0d70273d
Content hash
0d70273d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01102
Status: valid/unmigrated Version: rel:R25-11#6430c943 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_01102@rel:R25-11#6430c943
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#0d70273d2026-09-30
  • R24-11rel:R24-11#75d4d87e2026-10-14
  • R25-11rel:R25-11#6430c9432026-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