DEENESPTFRRUARHIKOZHNL

类 ara::core::Result< T &, E >

[SWS_CORE_00901] Upstream: RS_AP_00130

template <typename T, typename E> class Result< T &, E > final {...};

Specialization of class Result for reference to value types. The implementation shall flag the condition E!=ara::core::ErrorCode as a compile error.

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

用户指南人工智能生成

用于容错返回现有对象的引用或所发生的错误代码。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 8d8a51a8c902 来源 未决问题(1)
译自德文指南AI 生成gemini-3.8-flash-low · 2026-10-13 · 德文原文

用于容错返回现有对象的引用或所发生的错误代码。

特化 ara::core::Result<T&, E> 要么封装对类型为 T&([SWS_CORE_00902])的操作成功结果的非拥有型引用,要么封装类型为 E 的发生错误代码。使用者在通过解引用运算符或 Value() 访问所引用的目标对象之前,通常通过 HasValue()([SWS_CORE_00918])检查是否存在值。由于实例本身并不拥有所引用的对象,因此调用方大概需要确保该对象在结果的整个使用期限内都在内存中保持有效。 问题 Q-48d71186fb35af77 (未决)

上下文

模板特化 ara::core::Result<T&, E> 要么封装对类型为 value_type([SWS_CORE_00902])的操作成功结果的引用,要么封装类型为 error_type([SWS_CORE_00903])的错误值。作为模块 core 中的标准化返回结构,它实现了容错编程,而无需在常规流程中强制使用 C++ 异常。根据规范,实现会在编译时强制要求错误类型 E 对应于类型 ara::core::ErrorCode;偏离的配置会导致编译错误。交互伙伴包括提供数据服务、用于结果检查的调用组件,以及通过绑定引用直接访问的外部管理目标对象。

生命周期

实例被确定性地初始化为对现有左值的引用或错误。使用引用进行初始化通过构造函数 [SWS_CORE_00908] 或静态工厂方法 FromValue [SWS_CORE_00904] 进行;禁止传递右值。错误状态通过构造函数([SWS_CORE_00909]、[SWS_CORE_00910])或诸如 FromError([SWS_CORE_00905]、[SWS_CORE_00906]、[SWS_CORE_00907])等工厂创建。不存在默认构造函数。复制和移动构造函数([SWS_CORE_00911]、[SWS_CORE_00912])接管另一个实例的当前状态。

关于所有权关系,Result<T&, E> 仅绑定引用,不承担所引用目标对象的所有权或生命周期管理。因此,调用方大概必须确保目标对象在 Result 实例的整个存在期内保持有效。 问题 (未决)运行中的状态切换通过赋值运算符([SWS_CORE_00914]、[SWS_CORE_00915])执行,它们将内部引用重新绑定到新目标或传递错误。此外,EmplaceError [SWS_CORE_00916] 直接将实例置于错误状态,而 Swap [SWS_CORE_00917] 交换两个实例的内容。如果 E 是平凡可析构的,则析构函数 [SWS_CORE_00913] 表现为平凡析构。对值或错误的并行读取访问是线程安全的,而诸如赋值、Swap 或 EmplaceError 等改变状态的操作不是线程安全的。

ResultStates Init ValueState Wert-Referenz (T&) Init->ValueState FromValue / ctor ErrorState Fehler (E) Init->ErrorState FromError / ctor ValueState->ErrorState EmplaceError / op= ValueState->ErrorState Swap ErrorState->ValueState op= ErrorState->ValueState Swap

状态图:引用状态与错误状态之间的生命阶段和状态转换。来源:[SWS_CORE_00904]、[SWS_CORE_00905]、[SWS_CORE_00914]、[SWS_CORE_00916]、[SWS_CORE_00917]。

使用路径

常规流程包括状态控制以及针对性的评估:

检查并访问值或错误调用方DienstResult<T&, E>ermittleReferenz()Result<T&, E>HasValue()boolaltWert vorhandenValue()T&FehlerfallError()const E&

时序图:值和错误的典型查询与访问步骤。来源:[SWS_CORE_00918]、[SWS_CORE_00924]、[SWS_CORE_00928]。

错误场景

如果实例处于错误状态,Error()([SWS_CORE_00928]、[SWS_CORE_00929]、[SWS_CORE_00930])的重载授予对错误对象的访问权限。此外,错误可通过 Err()([SWS_CORE_00931]、[SWS_CORE_00932])作为 Optional<E> 获取,或通过 ErrorOr()([SWS_CORE_00935]、[SWS_CORE_00936])带有回退值获取。对于特定的错误比对,CheckError() [SWS_CORE_00937] 将所包含的错误与参考错误进行比较。

规范为元素访问定义了严格的前置条件:

本指南基于 AUTOSAR Adaptive Platform R25-11 规范(core 模块)。它已针对 autodocs 进行了自动策划。

成员图

类图

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

G nara__core__Result__T____E__551 Result< T &, E > + Result() + operator=() + ~Result() + Bind() + CheckError() + EmplaceError() + Err() + Error() + ErrorOr() + HasValue() + Ok() + Resolve() + Swap() + Value() + ValueOr() + ValueOrThrow() … 5 weitere

详细视图

请在大纲中选择一个条目。

构造函数和析构函数

Result 函数 5

Construct a new Result containing a reference to value from the specified reference to value. If U is not an lvalue, the program is ill-formed.

重载 Result 5
template <typename U = T> Result (const U &&t) noexcept; SWS_CORE_00908
explicit Result (const E &e) noexcept(std::is_nothrow_copy_ constructible< E >::value); SWS_CORE_00909
explicit Result (E &&e) noexcept(std::is_nothrow_move_constructible< E >::value); SWS_CORE_00910
Result (const Result &other) noexcept(std::is_nothrow_copy_ constructible< E >::value); SWS_CORE_00911
Result (Result &&other) noexcept(std::is_nothrow_move_constructible< E >::value); SWS_CORE_00912
~Result 函数

Destructor. This destructor is trivial if std::is_trivially_destructible<E>::value is true. ≙ std::is_trivially_destructible

~Result () noexcept;

方法

Bind 函数

Apply the given Callable to the value of this instance, and return a new Result with the result of the call. The Callable is expected to be compatible to one of these two interfaces: • Result<XXX, E> f(const T&); • XXX f(const T&); meaning that the Callable either returns a Result<XXX> or a XXX directly, where XXX can be any type that is suitable for use by class Result. The return type of this function is decltype(f(Value())) for a template argument F that returns a Result type, and it is Result<decltype(f(Value())), E> for a template argument F that does not return a Result type. If this instance does not contain a value, a new Result<XXX, E> is still created and returned, with the original error contents of this instance being copied into the new instance.

template <typename F> auto Bind (F &&f) const -> <see below>;
CheckError 函数

Return whether this instance contains the given error. This call compares the argument error, static_cast’d to E, with the return value from Error()

template <typename G> bool CheckError (G &&error) const;

Put a new error into this instance, constructed in-place from the given arguments.

template <typename... Args> void EmplaceError (Args &&... args) noexcept(std::is_nothrow_ constructible< E, Args... >::value);
Err 函数 2

Return the contained error as an ara::core::Optional.

重载 Err 2
Optional< E > Err () const &noexcept(std::is_nothrow_constructible< Optional< E >, const E &>::value); SWS_CORE_00931
Optional< E > Err () &&noexcept(std::is_nothrow_constructible< Optional< E >, E && >::value); SWS_CORE_00932
Error 函数 3

Access the contained error.

重载 Error 3
const E & Error () const & noexcept; SWS_CORE_00928
E & Error () & noexcept; SWS_CORE_00929
E && Error () &&noexcept; SWS_CORE_00930
ErrorOr 函数 2

Return the contained error or the given default error. If *this contains an error, it is returned. Otherwise, the specified default error is returned, static_cast’d to E

重载 ErrorOr 2
template <typename G> E ErrorOr (G &&defaultError) const &noexcept(std::is_nothrow_copy_ constructible< E >::value &&std::is_nothrow_constructible< E, G &&>::value); SWS_CORE_00935
template <typename G> E ErrorOr (G &&defaultError) &&noexcept(std::is_nothrow_move_ constructible< E >::value &&std::is_nothrow_constructible< E, G && >::value); SWS_CORE_00936
FromError 函数 3

Build a new ara::core::Result from the specified error (given as lvalue)

重载 FromError 3
static Result FromError (const E &e) noexcept(std::is_nothrow_copy_ constructible< E >::value); SWS_CORE_00905
static Result FromError (E &&e) noexcept(std::is_nothrow_move_ constructible< E >::value); SWS_CORE_00906
template <typename... Args> static Result FromError (Args &&... args) noexcept(std::is_nothrow_ constructible< E, Args... >::value); SWS_CORE_00907
FromValue 函数

Build a new Result from the reference to a specified value (given as lvalue). If U is not an lvalue, the program is ill-formed.

template <typename U = T> static Result FromValue (U &&u) noexcept;
HasValue 函数

Check whether *this contains a value.

bool HasValue () const noexcept;
Ok 函数 2

Return the referred-to value as an Optional

重载 Ok 2
Optional< const T & > Ok () const noexcept; SWS_CORE_00926
Optional< T & > Ok () noexcept; SWS_CORE_00927
Resolve 函数 2

Return the referred-to value or return the result of a function call. If *this contains a value, it is returned. Otherwise, the specified callable is invoked and its return value which is to be compatible to type T& is returned from this function. The Callable is expected to be compatible to this interface: const T& f(const E&);

重载 Resolve 2
template <typename F> const T & Resolve (F &&f) const; SWS_CORE_00939
template <typename F> T & Resolve (F &&f) const; SWS_CORE_00940

Access the referred-to value.

重载 Result< T &, E 2
const T * operator-> () const noexcept; SWS_CORE_00922
T * operator-> () noexcept; SWS_CORE_00923
Swap 函数

Exchange the contents of this instance with those of other

void Swap (Result &other) noexcept(std::is_nothrow_move_constructible< E >::value &&std::is_nothrow_move_assignable< E >::value);
Value 函数 2

Access the referred-to value.

重载 Value 2
const T & Value () const & noexcept; SWS_CORE_00924
T & Value () & noexcept; SWS_CORE_00925
ValueOr 函数 2

Return a copy of the referred-to value or the given default value. If *this contains a value, it is returned. Otherwise, the specified default value is returned, static_ cast’d to T.

重载 ValueOr 2
template <typename U> T ValueOr (U &&defaultValue) const &noexcept(std::is_nothrow_copy_ constructible< T >::value &&std::is_nothrow_constructible< T, U &&>::value); SWS_CORE_00933
template <typename U> T ValueOr (U &&defaultValue) &&noexcept(std::is_nothrow_move_ constructible< T >::value &&std::is_nothrow_constructible< T, U && >::value); SWS_CORE_00934
ValueOrThrow 函数 2

Return the contained value or throw an exception.

重载 ValueOrThrow 2
const T & ValueOrThrow () const noexcept(false); SWS_CORE_00938
T & ValueOrThrow () noexcept(false); SWS_CORE_00949

运算符

Check whether *this contains a value.

explicit operator bool () const noexcept;
operator* 函数 2

Access the referred-to value.

重载 * 2
const T & operator* () const & noexcept; SWS_CORE_00920
T & operator* () & noexcept; SWS_CORE_00921
operator= 函数 2

Copy-assignment operator If other contains a value, the contained reference is rebound to the referee of other. If other contains an error, the contained error is copy-constructed or copy-assigned from the one contained by other.

重载 = 2
Result & operator= (const Result &other) noexcept(std::is_nothrow_ copy_constructible< E >::value &&std::is_nothrow_copy_assignable< E >::value); SWS_CORE_00914

类型别名

error_type 类型别名

Type alias for the type E of errors

using error_type = E;
value_type 类型别名

Type alias for the type T& of values

using value_type = T&;

方法文档

函数 Result< T &, E [SWS_CORE_00922] Upstream: RS_AP_00130

const T * operator-> () const noexcept;

Access the referred-to value.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 78ad946285a2 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

成员函数 const T * operator-> () const noexcept 允许对 ara::core::Result<T &, E> 对象的被引用值进行同步读取访问 [SWS_CORE_00922]。它不接受任何实参,并返回指向被引用的目标对象的常量指针(const T *)作为返回值 [SWS_CORE_00922]。使用时需包含头文件 #include "ara/core/result.h" [SWS_CORE_00922]。

错误处理

该操作被声明为 noexcept,并具备 exception safe 特性 [SWS_CORE_00922]。如果对象不包含值,则属于前置条件违规(Violation)ResultWithNoValue [SWS_CORE_00922]。因此,调用者必须在解引用之前确保该实例确实持有一个有效值。

并发性与限制

该函数被指定为 thread-safe [SWS_CORE_00922]。由于它是一个常量成员函数,因此对同一实例的并发读取访问是安全的。然而,对目标对象本身的访问受制于类型 T 的线程安全保证。

相互作用

该运算符构成了非常量重载 T * operator-> () noexcept 的常量对应项 [SWS_CORE_00923]。非常量变体返回一个可修改的指针 T* [SWS_CORE_00923],而该版本则强制对被引用的实例进行不可变访问。

本文由 AI 基于 AUTOSAR 规范 R25-11 生成。

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)ResultWithNoValue- If *this does not contain a value. Violation

Rückgabewert

TypBeschreibung
const T *a const pointer to the referred-to value

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

Record
AUTOSAR/AP/record/SWS_CORE_00922
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00922@rel:R25-11#d650f5ca
Content hash
d650f5ca
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00922
Status: valid/unmigrated Version: rel:R25-11#9f451f5a 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_00922@rel:R25-11#9f451f5a
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#1000585b2026-09-30
  • R24-11rel:R24-11#9f451f5a2026-10-14
  • R25-11rel:R25-11#9f451f5a2026-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

函数 Result< T &, E [SWS_CORE_00923] Upstream: RS_AP_00130

T * operator-> () noexcept;

Access the referred-to value.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 798448906bb1 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

根据 [SWS_CORE_00923],成员函数 operator-> 允许直接访问 ara::core::Result<T&, E> 实例中被引用的值。该函数需要头文件 #include "ara/core/result.h",不接受任何参数,并返回指向所包含或被引用值的 T* 类型指针。该调用以同步方式执行,并被声明为 noexcept。

错误处理与边界条件

若在访问时对象不包含值,则构成形式为 ResultWithNoValue-Violation 的规范违规 [SWS_CORE_00923]。该成员函数未指定具体的 DET 或 DEM 错误消息。关于并发性与容错性,该运算符被归类为 thread-safe 以及 exception safe [SWS_CORE_00923]。调用者在调用前大概应当确保该实例确实持有一个有效值,以防止触发违规。 问题 Q-a4b13cd34a40eb19 (未决)

相互作用

在与模板 ara::core::Result<T&, E> 的协作中,该非常量成员函数补充了来自 [SWS_CORE_00922] 的相应常量重载 const T * operator-> () const noexcept,后者遵循相同的保护规则,但提供只读指针(const T*)。

此使用说明由 AI 基于规范自动生成。

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)ResultWithNoValue- If *this does not contain a value. Violation

Rückgabewert

TypBeschreibung
T*a pointer to the contained value

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

Record
AUTOSAR/AP/record/SWS_CORE_00923
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00923@rel:R25-11#2403443d
Content hash
2403443d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00923
Status: valid/unmigrated Version: rel:R25-11#af163541 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_00923@rel:R25-11#af163541
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#1716a9d42026-09-30
  • R24-11rel:R24-11#ba5721012026-10-14
  • R25-11rel:R25-11#af1635412026-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

函数 Bind [SWS_CORE_00941] Upstream: RS_AP_00130

template <typename F> auto Bind (F &&f) const -> <see below>;

Apply the given Callable to the value of this instance, and return a new Result with the result of the call. The Callable is expected to be compatible to one of these two interfaces: • Result<XXX, E> f(const T&); • XXX f(const T&); meaning that the Callable either returns a Result<XXX> or a XXX directly, where XXX can be any type that is suitable for use by class Result. The return type of this function is decltype(f(Value())) for a template argument F that returns a Result type, and it is Result<decltype(f(Value())), E> for a template argument F that does not return a Result type. If this instance does not contain a value, a new Result<XXX, E> is still created and returned, with the original error contents of this instance being copied into the new instance.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitnot exception safe
Thread-Sicherheitconditional, depends on thread-safety of f

Template-Parameter

ParameterBeschreibung
Fthe type of the Callable f

Parameter (in)

ParameterBeschreibung
fthe Callable

Rückgabewert

TypBeschreibung
<see below>a new Result instance of the possibly transformed type

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

Record
AUTOSAR/AP/record/SWS_CORE_00941
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00941@rel:R25-11#fa3537b5
Content hash
fa3537b5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00941
Status: valid/unmigrated Version: rel:R25-11#0126aa36 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_00941@rel:R25-11#0126aa36
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#78eae1372026-09-30
  • R24-11rel:R24-11#d8b1c6212026-10-14
  • R25-11rel:R25-11#0126aa362026-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

函数 CheckError [SWS_CORE_00937] Upstream: RS_AP_00130

template <typename G> bool CheckError (G &&error) const;

Return whether this instance contains the given error. This call compares the argument error, static_cast’d to E, with the return value from Error()

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitnot exception safe
Thread-Sicherheitthread-safe

Template-Parameter

ParameterBeschreibung
Gthe type of the error argument error

Parameter (in)

ParameterBeschreibung
errorthe error to check

Rückgabewert

TypBeschreibung
booltrue if *this contains an error that is equivalent to the given error, false otherwise

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

Record
AUTOSAR/AP/record/SWS_CORE_00937
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00937@rel:R25-11#774cb65a
Content hash
774cb65a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00937
Status: valid/unmigrated Version: rel:R25-11#9f24181c 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_00937@rel:R25-11#9f24181c
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#b35758fd2026-09-30
  • R24-11rel:R24-11#112e32e52026-10-14
  • R25-11rel:R25-11#9f24181c2026-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

函数 EmplaceError [SWS_CORE_00916] Upstream: RS_AP_00130

template <typename... Args> void EmplaceError (Args &&... args) noexcept(std::is_nothrow_ constructible< E, Args... >::value);

Put a new error into this instance, constructed in-place from the given arguments.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitnot thread-safe

Template-Parameter

ParameterBeschreibung
Args...the types of arguments given to this function

Parameter (in)

ParameterBeschreibung
argsthe arguments used for constructing the error

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CORE_00916
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00916@rel:R25-11#404c250b
Content hash
404c250b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00916
Status: valid/unmigrated Version: rel:R25-11#a2c792b8 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_00916@rel:R25-11#a2c792b8
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#44cec67d2026-09-30
  • R24-11rel:R24-11#a2c792b82026-10-14
  • R25-11rel:R25-11#a2c792b82026-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

函数 Err [SWS_CORE_00931] Upstream: RS_AP_00130

Optional< E > Err () const &noexcept(std::is_nothrow_constructible< Optional< E >, const E &>::value);

Return the contained error as an ara::core::Optional.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
Optional< E >an ara::core::Optional with the error, if present

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

Record
AUTOSAR/AP/record/SWS_CORE_00931
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00931@rel:R25-11#8765944a
Content hash
8765944a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00931
Status: valid/unmigrated Version: rel:R25-11#367c1db3 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_00931@rel:R25-11#367c1db3
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#2576421d2026-09-30
  • R24-11rel:R24-11#7bb5b2f52026-10-14
  • R25-11rel:R25-11#367c1db32026-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

函数 Err [SWS_CORE_00932] Upstream: RS_AP_00130

Optional< E > Err () &&noexcept(std::is_nothrow_constructible< Optional< E >, E && >::value);

Return the contained error as an ara::core::Optional.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
Optional< E >an ara::core::Optional with the error, if present

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

Record
AUTOSAR/AP/record/SWS_CORE_00932
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00932@rel:R25-11#edcd0f70
Content hash
edcd0f70
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00932
Status: valid/unmigrated Version: rel:R25-11#3cc684f4 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_00932@rel:R25-11#3cc684f4
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#04a7d8d42026-09-30
  • R24-11rel:R24-11#16f325ba2026-10-14
  • R25-11rel:R25-11#3cc684f42026-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

函数 Error [SWS_CORE_00928] Upstream: RS_AP_00130

const E & Error () const & noexcept;

Access the contained error.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)ResultWithNoEr- If *this does not contain an error. rorViolation

Rückgabewert

TypBeschreibung
const E &a const reference to the contained error

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

Record
AUTOSAR/AP/record/SWS_CORE_00928
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00928@rel:R25-11#3229362d
Content hash
3229362d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00928
Status: valid/unmigrated Version: rel:R25-11#3a785d8e 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_00928@rel:R25-11#3a785d8e
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#43d54cae2026-09-30
  • R24-11rel:R24-11#3a785d8e2026-10-14
  • R25-11rel:R25-11#3a785d8e2026-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

函数 Error [SWS_CORE_00929] Upstream: RS_AP_00130

E & Error () & noexcept;

Access the contained error.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)ResultWithNoEr- If *this does not contain an error. rorViolation

Rückgabewert

TypBeschreibung
E&a reference to the contained error

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

Record
AUTOSAR/AP/record/SWS_CORE_00929
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00929@rel:R25-11#915b6bdb
Content hash
915b6bdb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00929
Status: valid/unmigrated Version: rel:R25-11#9e868c10 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_00929@rel:R25-11#9e868c10
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#25dca9a02026-09-30
  • R24-11rel:R24-11#9e868c102026-10-14
  • R25-11rel:R25-11#9e868c102026-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

函数 Error [SWS_CORE_00930] Upstream: RS_AP_00130

E && Error () &&noexcept;

Access the contained error.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)ResultWithNoEr- If *this does not contain an error. rorViolation

Rückgabewert

TypBeschreibung
E &&an rvalue reference to the contained error

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

Record
AUTOSAR/AP/record/SWS_CORE_00930
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00930@rel:R25-11#fb75277a
Content hash
fb75277a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00930
Status: valid/unmigrated Version: rel:R25-11#63e8122f 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_00930@rel:R25-11#63e8122f
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#63ed636b2026-09-30
  • R24-11rel:R24-11#63e8122f2026-10-14
  • R25-11rel:R25-11#63e8122f2026-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

函数 ErrorOr [SWS_CORE_00935] Upstream: RS_AP_00130

template <typename G> E ErrorOr (G &&defaultError) const &noexcept(std::is_nothrow_copy_ constructible< E >::value &&std::is_nothrow_constructible< E, G &&>::value);

Return the contained error or the given default error. If *this contains an error, it is returned. Otherwise, the specified default error is returned, static_cast’d to E

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitthread-safe

Template-Parameter

ParameterBeschreibung
Gthe type of defaultError

Parameter (in)

ParameterBeschreibung
defaultErrorthe error to use if *this does not contain an error

Rückgabewert

TypBeschreibung
Ethe error

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

Record
AUTOSAR/AP/record/SWS_CORE_00935
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00935@rel:R25-11#002124db
Content hash
002124db
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00935
Status: valid/unmigrated Version: rel:R25-11#96361ca4 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_00935@rel:R25-11#96361ca4
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#e2606b982026-09-30
  • R24-11rel:R24-11#7d28dddd2026-10-14
  • R25-11rel:R25-11#96361ca42026-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

函数 ErrorOr [SWS_CORE_00936] Upstream: RS_AP_00130

template <typename G> E ErrorOr (G &&defaultError) &&noexcept(std::is_nothrow_move_ constructible< E >::value &&std::is_nothrow_constructible< E, G && >::value);

Return the contained error or the given default error. If *this contains an error, it is std:: move’d into the return value. Otherwise, the specified default error is returned, static_cast’d to E

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitthread-safe

Template-Parameter

ParameterBeschreibung
Gthe type of defaultError

Parameter (in)

ParameterBeschreibung
defaultErrorthe error to use if *this does not contain an error

Rückgabewert

TypBeschreibung
Ethe error

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

Record
AUTOSAR/AP/record/SWS_CORE_00936
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00936@rel:R25-11#a4604ac1
Content hash
a4604ac1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00936
Status: valid/unmigrated Version: rel:R25-11#ae7f8d57 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_00936@rel:R25-11#ae7f8d57
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#6e984ee52026-09-30
  • R24-11rel:R24-11#8548dd712026-10-14
  • R25-11rel:R25-11#ae7f8d572026-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

函数 FromError [SWS_CORE_00905] Upstream: RS_AP_00130

static Result FromError (const E &e) noexcept(std::is_nothrow_copy_ constructible< E >::value);

Build a new ara::core::Result from the specified error (given as lvalue)

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
ethe error to put into the ara::core::Result

Rückgabewert

TypBeschreibung
Resulta ara::core::Result that contains the error e

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

Record
AUTOSAR/AP/record/SWS_CORE_00905
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00905@rel:R25-11#228ab76b
Content hash
228ab76b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00905
Status: valid/unmigrated Version: rel:R25-11#41559e51 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_00905@rel:R25-11#41559e51
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#dd186e732026-09-30
  • R24-11rel:R24-11#d8a1d0a02026-10-14
  • R25-11rel:R25-11#41559e512026-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

函数 FromError [SWS_CORE_00906] Upstream: RS_AP_00130

static Result FromError (E &&e) noexcept(std::is_nothrow_move_ constructible< E >::value);

Build a new ara::core::Result from the specified error (given as rvalue)

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
ethe error to put into the ara::core::Result

Rückgabewert

TypBeschreibung
Resulta ara::core::Result that contains the error e

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

Record
AUTOSAR/AP/record/SWS_CORE_00906
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00906@rel:R25-11#8ced858d
Content hash
8ced858d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00906
Status: valid/unmigrated Version: rel:R25-11#228ba9e5 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_00906@rel:R25-11#228ba9e5
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#9ba6bef62026-09-30
  • R24-11rel:R24-11#e77e81e82026-10-14
  • R25-11rel:R25-11#228ba9e52026-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

函数 FromError [SWS_CORE_00907] Upstream: RS_AP_00130

template <typename... Args> static Result FromError (Args &&... args) noexcept(std::is_nothrow_ constructible< E, Args... >::value);

Build a new Result from an error that is constructed in-place from the given arguments. This function shall not participate in overload resolution unless: std::is_constructible<E, Args&&...>::value is true, and • the first type of the expanded parameter pack is not E, and • the first type of the expanded parameter pack is not a specialization of Result

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitnot thread-safe

Template-Parameter

ParameterBeschreibung
Args...the types of arguments given to this function

Parameter (in)

ParameterBeschreibung
argsthe parameter pack used for constructing the error

Rückgabewert

TypBeschreibung
Resulta Result that contains an error

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

Record
AUTOSAR/AP/record/SWS_CORE_00907
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00907@rel:R25-11#985f84a1
Content hash
985f84a1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00907
Status: valid/unmigrated Version: rel:R25-11#2e812431 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_00907@rel:R25-11#2e812431
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#f0efbfee2026-09-30
  • R24-11rel:R24-11#282d12a22026-10-14
  • R25-11rel:R25-11#2e8124312026-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

函数 FromValue [SWS_CORE_00904] Upstream: RS_AP_00130

template <typename U = T> static Result FromValue (U &&u) noexcept;

Build a new Result from the reference to a specified value (given as lvalue). If U is not an lvalue, the program is ill-formed.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Template-Parameter

ParameterBeschreibung
Uthe type of u

Parameter (in)

ParameterBeschreibung
uthe value to bind to

Rückgabewert

TypBeschreibung
Resulta Result that contains a reference to value

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

Record
AUTOSAR/AP/record/SWS_CORE_00904
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00904@rel:R25-11#194d7137
Content hash
194d7137
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00904
Status: valid/unmigrated Version: rel:R25-11#1e4ff745 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_00904@rel:R25-11#1e4ff745
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#a933c6fd2026-09-30
  • R24-11rel:R24-11#2545e3982026-10-14
  • R25-11rel:R25-11#1e4ff7452026-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

函数 HasValue [SWS_CORE_00918] Upstream: RS_AP_00130

bool HasValue () const noexcept;

Check whether *this contains a value.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
booltrue if *this contains a value, false otherwise

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

Record
AUTOSAR/AP/record/SWS_CORE_00918
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00918@rel:R25-11#550cd5c0
Content hash
550cd5c0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00918
Status: valid/unmigrated Version: rel:R25-11#7f4bf0bf 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_00918@rel:R25-11#7f4bf0bf
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#be8026e42026-09-30
  • R24-11rel:R24-11#7f4bf0bf2026-10-14
  • R25-11rel:R25-11#7f4bf0bf2026-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

函数 Ok [SWS_CORE_00926] Upstream: RS_AP_00130

Optional< const T & > Ok () const noexcept;

Return the referred-to value as an Optional

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
Optional< const T & >an Optional with the const-reference to value, if present

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

Record
AUTOSAR/AP/record/SWS_CORE_00926
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00926@rel:R25-11#696b3d5e
Content hash
696b3d5e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00926
Status: valid/unmigrated Version: rel:R25-11#69b57392 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_00926@rel:R25-11#69b57392
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#98d5e8922026-09-30
  • R24-11rel:R24-11#69b573922026-10-14
  • R25-11rel:R25-11#69b573922026-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

函数 Ok [SWS_CORE_00927] Upstream: RS_AP_00130

Optional< T & > Ok () noexcept;

Return the referred-to value as an Optional.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
Optional< T & >an Optional with the reference to value, if present

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

Record
AUTOSAR/AP/record/SWS_CORE_00927
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00927@rel:R25-11#cfc6a9b9
Content hash
cfc6a9b9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00927
Status: valid/unmigrated Version: rel:R25-11#8d30f5f6 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_00927@rel:R25-11#8d30f5f6
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#559a5ec22026-09-30
  • R24-11rel:R24-11#8d30f5f62026-10-14
  • R25-11rel:R25-11#8d30f5f62026-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

函数 Resolve [SWS_CORE_00939] Upstream: RS_AP_00130

template <typename F> const T & Resolve (F &&f) const;

Return the referred-to value or return the result of a function call. If *this contains a value, it is returned. Otherwise, the specified callable is invoked and its return value which is to be compatible to type T& is returned from this function. The Callable is expected to be compatible to this interface: const T& f(const E&);

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitnot exception safe
Thread-Sicherheitconditional, depends on thread safety of f

Template-Parameter

ParameterBeschreibung
Fthe type of the Callable f

Parameter (in)

ParameterBeschreibung
fthe Callable

Rückgabewert

TypBeschreibung
const T &the referred-to value

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

Record
AUTOSAR/AP/record/SWS_CORE_00939
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00939@rel:R25-11#37716b21
Content hash
37716b21
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00939
Status: valid/unmigrated Version: rel:R25-11#fdf742a1 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_00939@rel:R25-11#fdf742a1
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#089046092026-09-30
  • R24-11rel:R24-11#fdf742a12026-10-14
  • R25-11rel:R25-11#fdf742a12026-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

函数 Resolve [SWS_CORE_00940] Upstream: RS_AP_00130

template <typename F> T & Resolve (F &&f) const;

Return the referred-to value or return the result of a function call. If *this contains a value, it is returned. Otherwise, the specified callable is invoked and its return value which is to be compatible to type T& is returned from this function. The Callable is expected to be compatible to this interface: T& f(const E&);

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitnot exception safe
Thread-Sicherheitconditional, depends on thread safety of f

Template-Parameter

ParameterBeschreibung
Fthe type of the Callable f

Parameter (in)

ParameterBeschreibung
fthe Callable

Rückgabewert

TypBeschreibung
T&the referred-to value

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

Record
AUTOSAR/AP/record/SWS_CORE_00940
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00940@rel:R25-11#947e0f5e
Content hash
947e0f5e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00940
Status: valid/unmigrated Version: rel:R25-11#e7d820cc 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_00940@rel:R25-11#e7d820cc
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#2c14257c2026-09-30
  • R24-11rel:R24-11#e7d820cc2026-10-14
  • R25-11rel:R25-11#e7d820cc2026-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

函数 Result [SWS_CORE_00908] Upstream: RS_AP_00130

template <typename U = T> Result (const U &&t) noexcept;

Construct a new Result containing a reference to value from the specified reference to value. If U is not an lvalue, the program is ill-formed.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Template-Parameter

ParameterBeschreibung
Uthe type of t

Parameter (in)

ParameterBeschreibung
tthe value to bind to

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

Record
AUTOSAR/AP/record/SWS_CORE_00908
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00908@rel:R25-11#a2f9585e
Content hash
a2f9585e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00908
Status: valid/unmigrated Version: rel:R25-11#b96d9e9c 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_00908@rel:R25-11#b96d9e9c
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#3c9b72342026-09-30
  • R24-11rel:R24-11#066248f52026-10-14
  • R25-11rel:R25-11#b96d9e9c2026-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

函数 Result [SWS_CORE_00909] Upstream: RS_AP_00130

explicit Result (const E &e) noexcept(std::is_nothrow_copy_ constructible< E >::value);

Construct a new ara::core::Result from the specified error (given as lvalue)

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
ethe error to put into the ara::core::Result

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

Record
AUTOSAR/AP/record/SWS_CORE_00909
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00909@rel:R25-11#bd2ad868
Content hash
bd2ad868
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00909
Status: valid/unmigrated Version: rel:R25-11#46372288 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_00909@rel:R25-11#46372288
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#4a6493a22026-09-30
  • R24-11rel:R24-11#5ebcd7662026-10-14
  • R25-11rel:R25-11#463722882026-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

函数 Result [SWS_CORE_00910] Upstream: RS_AP_00130

explicit Result (E &&e) noexcept(std::is_nothrow_move_constructible< E >::value);

Construct a new ara::core::Result from the specified error (given as rvalue)

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
ethe error to put into the ara::core::Result

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

Record
AUTOSAR/AP/record/SWS_CORE_00910
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00910@rel:R25-11#41f5fb06
Content hash
41f5fb06
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00910
Status: valid/unmigrated Version: rel:R25-11#c5e5c952 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_00910@rel:R25-11#c5e5c952
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#0e04ebf92026-09-30
  • R24-11rel:R24-11#859dd0432026-10-14
  • R25-11rel:R25-11#c5e5c9522026-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

函数 Result [SWS_CORE_00911] Upstream: RS_AP_00130

Result (const Result &other) noexcept(std::is_nothrow_copy_ constructible< E >::value);

Copy-construct a new ara::core::Result from another instance

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
otherthe other instance

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

Record
AUTOSAR/AP/record/SWS_CORE_00911
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00911@rel:R25-11#fffa3e8f
Content hash
fffa3e8f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00911
Status: valid/unmigrated Version: rel:R25-11#9a80ad1c 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_00911@rel:R25-11#9a80ad1c
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#ca8f9c002026-09-30
  • R24-11rel:R24-11#b1c37cf12026-10-14
  • R25-11rel:R25-11#9a80ad1c2026-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

函数 Result [SWS_CORE_00912] Upstream: RS_AP_00130

Result (Result &&other) noexcept(std::is_nothrow_move_constructible< E >::value);

Move-construct a new Result from another instance

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
otherthe other instance

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

Record
AUTOSAR/AP/record/SWS_CORE_00912
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00912@rel:R25-11#1c0e3b1f
Content hash
1c0e3b1f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00912
Status: valid/unmigrated Version: rel:R25-11#52978d92 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_00912@rel:R25-11#52978d92
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#565105002026-09-30
  • R24-11rel:R24-11#e6a2c0d12026-10-14
  • R25-11rel:R25-11#52978d922026-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

函数 Swap [SWS_CORE_00917] Upstream: RS_AP_00130

void Swap (Result &other) noexcept(std::is_nothrow_move_constructible< E >::value &&std::is_nothrow_move_assignable< E >::value);

Exchange the contents of this instance with those of other

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitnot thread-safe

Parameter (in/out)

ParameterBeschreibung
otherthe other instance

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CORE_00917
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00917@rel:R25-11#9c289bc3
Content hash
9c289bc3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00917
Status: valid/unmigrated Version: rel:R25-11#72e89881 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_00917@rel:R25-11#72e89881
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#bd04da7d2026-09-30
  • R24-11rel:R24-11#2d8fcf422026-10-14
  • R25-11rel:R25-11#72e898812026-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

函数 Value [SWS_CORE_00924] Upstream: RS_AP_00130

const T & Value () const & noexcept;

Access the referred-to value.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)ResultWithNoValue- If *this does not contain a value. Violation

Rückgabewert

TypBeschreibung
const T &a const reference to the referred-to value

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

Record
AUTOSAR/AP/record/SWS_CORE_00924
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00924@rel:R25-11#3f835ea3
Content hash
3f835ea3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00924
Status: valid/unmigrated Version: rel:R25-11#25229425 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_00924@rel:R25-11#25229425
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#28f643a42026-09-30
  • R24-11rel:R24-11#252294252026-10-14
  • R25-11rel:R25-11#252294252026-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

函数 Value [SWS_CORE_00925] Upstream: RS_AP_00130

T & Value () & noexcept;

Access the referred-to value.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)ResultWithNoValue- If *this does not contain a value. Violation

Rückgabewert

TypBeschreibung
T&a reference to the referred-to value

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

Record
AUTOSAR/AP/record/SWS_CORE_00925
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00925@rel:R25-11#ba4bfd5d
Content hash
ba4bfd5d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00925
Status: valid/unmigrated Version: rel:R25-11#96d0afae 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_00925@rel:R25-11#96d0afae
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#d89bc0722026-09-30
  • R24-11rel:R24-11#96d0afae2026-10-14
  • R25-11rel:R25-11#96d0afae2026-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

函数 ValueOr [SWS_CORE_00933] Upstream: RS_AP_00130

template <typename U> T ValueOr (U &&defaultValue) const &noexcept(std::is_nothrow_copy_ constructible< T >::value &&std::is_nothrow_constructible< T, U &&>::value);

Return a copy of the referred-to value or the given default value. If *this contains a value, it is returned. Otherwise, the specified default value is returned, static_ cast’d to T.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitthread-safe

Template-Parameter

ParameterBeschreibung
Uthe type of defaultValue

Parameter (in)

ParameterBeschreibung
defaultValuethe value to use if *this does not contain a value

Rückgabewert

TypBeschreibung
Tthe value

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

Record
AUTOSAR/AP/record/SWS_CORE_00933
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00933@rel:R25-11#8e9ce214
Content hash
8e9ce214
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00933
Status: valid/unmigrated Version: rel:R25-11#afe9e54f 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_00933@rel:R25-11#afe9e54f
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#73a9ae6d2026-09-30
  • R24-11rel:R24-11#aae94efe2026-10-14
  • R25-11rel:R25-11#afe9e54f2026-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

函数 ValueOr [SWS_CORE_00934] Upstream: RS_AP_00130

template <typename U> T ValueOr (U &&defaultValue) &&noexcept(std::is_nothrow_move_ constructible< T >::value &&std::is_nothrow_constructible< T, U && >::value);

Return a copy of the referred-to value or the given default value. If *this contains a value, it is returned. Otherwise, the specified default value is returned, static_ cast’d to T.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitthread-safe

Template-Parameter

ParameterBeschreibung
Uthe type of defaultValue

Parameter (in)

ParameterBeschreibung
defaultValuethe value to use if *this does not contain a value

Rückgabewert

TypBeschreibung
Tthe value

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

Record
AUTOSAR/AP/record/SWS_CORE_00934
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00934@rel:R25-11#88eb307e
Content hash
88eb307e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00934
Status: valid/unmigrated Version: rel:R25-11#008e53e8 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_00934@rel:R25-11#008e53e8
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#32e3eaec2026-09-30
  • R24-11rel:R24-11#008e53e82026-10-14
  • R25-11rel:R25-11#008e53e82026-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

函数 ValueOrThrow [SWS_CORE_00938] Upstream: RS_AP_00130

const T & ValueOrThrow () const noexcept(false);

Return the contained value or throw an exception.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 81dc031902ad 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

模板特化 ara::core::Result<T &, E> 的同步成员函数 ValueOrThrow 允许访问所包含的值([SWS_CORE_00938])。操作成功时,它返回指向所封装引用目标的常量引用(const T &)。

如果该对象表示错误情况,则该函数抛出与该特定错误关联的异常(noexcept(false))([SWS_CORE_00938])。规范明确将该操作的异常安全性归类为非异常安全(not exception safe)([SWS_CORE_00938])。

关于并发性,该方法被声明为线程安全([SWS_CORE_00938])。一个重要的约束条件涉及构建配置:如果编译器工具链中禁用了 C++ 异常,则 ValueOrThrow 不参与重载解析([SWS_CORE_00938])。

在头文件 ara/core/result.h 内,该函数构成了非常量引用重载 [SWS_CORE_00949] 的常量对等版本。对于常规值类型,提供了针对左值和右值的类似重载([SWS_CORE_00766]、[SWS_CORE_00769]、[SWS_CORE_00778]),而对于 ara::core::Result<void, E> 则定义了无返回值的重载([SWS_CORE_00866])。

此使用说明基于 R25-11 规范自动生成。

实现者指南即将推出(复杂度 I1)

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitnot exception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
const T &a const reference to the contained value

Exceptions

The exception type associated with the contained error

Hinweise: This function shall not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain

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

Record
AUTOSAR/AP/record/SWS_CORE_00938
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00938@rel:R25-11#8cc2d033
Content hash
8cc2d033
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00938
Status: valid/unmigrated Version: rel:R25-11#af72fdda 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_00938@rel:R25-11#af72fdda
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#11054bee2026-09-30
  • R24-11rel:R24-11#881ca26f2026-10-14
  • R25-11rel:R25-11#af72fdda2026-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

函数 ValueOrThrow [SWS_CORE_00949] Upstream: RS_AP_00130

T & ValueOrThrow () noexcept(false);

Return a reference to the contained value or throw an exception.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: cc4ce28e1dcf 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

模板特化 ara::core::Result<T&, E> 的成员函数 ValueOrThrow 用于同步访问所包含的引用值 [SWS_CORE_00949]。它不接受任何参数,并返回对所存储值的非常量引用 T& [SWS_CORE_00949]。

如果对象中不存在值而是存在错误,则该操作不是异常安全的(not exception safe),并会引发属于该错误类型的异常(noexcept(false))[SWS_CORE_00949]。使用中的一个重要约束条件是:如果编译器工具链中禁用了 C++ 异常,则该函数不参与重载解析 [SWS_CORE_00949]。

在并发性方面,该调用被指定为线程安全 [SWS_CORE_00949]。在针对引用的特化 ara::core::Result<T&, E> 内,存在作为常量变体的重载 [SWS_CORE_00938],其返回 const T&。该行为补充了主模板 ara::core::Result 针对左值引用 [SWS_CORE_00778]、const 左值引用 [SWS_CORE_00766] 和右值引用 [SWS_CORE_00769] 的重载,以及针对 void 的特化 [SWS_CORE_00866]。

本使用说明基于 AUTOSAR 规范自动创建。

实现者指南即将推出(复杂度 I1)

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitnot exception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
T&a reference to the contained value

Exceptions

The exception type associated with the contained error

Hinweise: This function shall not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain

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

Record
AUTOSAR/AP/record/SWS_CORE_00949
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00949@rel:R25-11#b38d331a
Content hash
b38d331a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00949
Status: valid/unmigrated Version: rel:R25-11#13bf0d5f Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_00949@rel:R25-11#13bf0d5f
Point-in-Time History:
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

函数 operator bool [SWS_CORE_00919] Upstream: RS_AP_00130

explicit operator bool () const noexcept;

Check whether *this contains a value.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
booltrue if *this contains a value, false otherwise

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

Record
AUTOSAR/AP/record/SWS_CORE_00919
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00919@rel:R25-11#44adecbf
Content hash
44adecbf
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00919
Status: valid/unmigrated Version: rel:R25-11#9caff649 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_00919@rel:R25-11#9caff649
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#463c55122026-09-30
  • R24-11rel:R24-11#c1d3eae72026-10-14
  • R25-11rel:R25-11#9caff6492026-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

函数 operator* [SWS_CORE_00920] Upstream: RS_AP_00130

const T & operator* () const & noexcept;

Access the referred-to value.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)ResultWithNoValue- If *this does not contain a value. Violation

Rückgabewert

TypBeschreibung
const T &a const_reference to the referred-to value

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

Record
AUTOSAR/AP/record/SWS_CORE_00920
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00920@rel:R25-11#ad68f5dc
Content hash
ad68f5dc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00920
Status: valid/unmigrated Version: rel:R25-11#20cbba54 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_00920@rel:R25-11#20cbba54
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#10c55e492026-09-30
  • R24-11rel:R24-11#d76ea3032026-10-14
  • R25-11rel:R25-11#20cbba542026-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

函数 operator* [SWS_CORE_00921] Upstream: RS_AP_00130

T & operator* () & noexcept;

Access the referred-to value.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)ResultWithNoValue- If *this does not contain a value. Violation

Rückgabewert

TypBeschreibung
T&a pointer to the referred-to value

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

Record
AUTOSAR/AP/record/SWS_CORE_00921
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00921@rel:R25-11#6ffd2ad4
Content hash
6ffd2ad4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00921
Status: valid/unmigrated Version: rel:R25-11#ae9be381 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_00921@rel:R25-11#ae9be381
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#6b2811452026-09-30
  • R24-11rel:R24-11#ae9be3812026-10-14
  • R25-11rel:R25-11#ae9be3812026-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

函数 operator= [SWS_CORE_00914] Upstream: RS_AP_00130

Result & operator= (const Result &other) noexcept(std::is_nothrow_ copy_constructible< E >::value &&std::is_nothrow_copy_assignable< E >::value);

Copy-assignment operator If other contains a value, the contained reference is rebound to the referee of other. If other contains an error, the contained error is copy-constructed or copy-assigned from the one contained by other.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
otherthe other instance

Rückgabewert

TypBeschreibung
Result &*this, containing the contents of other

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

Record
AUTOSAR/AP/record/SWS_CORE_00914
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00914@rel:R25-11#d5a1d6fb
Content hash
d5a1d6fb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00914
Status: valid/unmigrated Version: rel:R25-11#7d7fecd1 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_00914@rel:R25-11#7d7fecd1
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#87b4ac302026-09-30
  • R24-11rel:R24-11#7d7fecd12026-10-14
  • R25-11rel:R25-11#7d7fecd12026-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

函数 operator= [SWS_CORE_00915] Upstream: RS_AP_00130

Result & operator= (Result &&other) noexcept(std::is_nothrow_move_ constructible< E >::value &&std::is_nothrow_move_assignable< E >::value);

Move-assignment operator If other contains a value, the contained reference is rebound to the referee of other. If other contains an error, the contained error is move-constructed or move-assigned from the one contained by other.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
otherthe other instance

Rückgabewert

TypBeschreibung
Result &*this, containing the contents of other

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

Record
AUTOSAR/AP/record/SWS_CORE_00915
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00915@rel:R25-11#41def119
Content hash
41def119
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00915
Status: valid/unmigrated Version: rel:R25-11#7c4a74e8 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_00915@rel:R25-11#7c4a74e8
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#388263682026-09-30
  • R24-11rel:R24-11#7c4a74e82026-10-14
  • R25-11rel:R25-11#7c4a74e82026-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

函数 ~Result [SWS_CORE_00913] Upstream: RS_AP_00130

~Result () noexcept;

Destructor. This destructor is trivial if std::is_trivially_destructible<E>::value is true.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

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

Record
AUTOSAR/AP/record/SWS_CORE_00913
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00913@rel:R25-11#ba86fb52
Content hash
ba86fb52
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00913
Status: valid/unmigrated Version: rel:R25-11#77d99248 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_00913@rel:R25-11#77d99248
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#311b9cf42026-09-30
  • R24-11rel:R24-11#77d992482026-10-14
  • R25-11rel:R25-11#77d992482026-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

类型别名文档

类型别名 error_type [SWS_CORE_00903] Upstream: RS_AP_00130

using error_type = E;

Type alias for the type E of errors

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Symbolerror_type

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

Record
AUTOSAR/AP/record/SWS_CORE_00903
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00903@rel:R25-11#3db78373
Content hash
3db78373
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00903
Status: valid/unmigrated Version: rel:R25-11#042553bb 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_00903@rel:R25-11#042553bb
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#71ba70032026-09-30
  • R24-11rel:R24-11#042553bb2026-10-14
  • R25-11rel:R25-11#042553bb2026-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

类型别名 value_type [SWS_CORE_00902] Upstream: RS_AP_00130

using value_type = T&;

Type alias for the type T& of values

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< T &, E >
Symbolvalue_type

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

Record
AUTOSAR/AP/record/SWS_CORE_00902
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00902@rel:R25-11#6f87bfe1
Content hash
6f87bfe1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00902
Status: valid/unmigrated Version: rel:R25-11#0efd456c 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_00902@rel:R25-11#0efd456c
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#41d058682026-09-30
  • R24-11rel:R24-11#0efd456c2026-10-14
  • R25-11rel:R25-11#0efd456c2026-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