DEENESPTFRRUARHIKOZHNL

类 ara::core::Result< void, E >

[SWS_CORE_00801] Upstream: RS_AP_00130

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

Specialization of class Result for "void" values 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 · 温度: 不可控 · 提示词: 8bbf74b21d56 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

指示无返回值操作的成功完成,或传递所发生的错误码。

类 ara::core::Result<void, E> 为无返回值的操作特化了 Result 模式,并映射成功完成或错误([SWS_CORE_00811])。执行后,调用方通过 HasValue()([SWS_CORE_00851])或 operator bool() 检查成功状态,并在出错时访问所包含的错误原因。作为具有约束力的边界条件,错误类型 E 必须与类型 ara::core::ErrorCode 匹配,因为不同的类型在编译期就会被拒绝。

上下文

模板类 ara::core::Result<void, E> 代表了 Result 模式的部分特化,用于在成功时不传递返回值(void),而仅指示操作成功或失败的情况。根据类型定义,值类型 value_type 始终固定为 void([SWS_CORE_00811]),而 error_type 表示参数化的错误类型 E([SWS_CORE_00812])。对于类型 E,其功能规范要求任何与 ara::core::ErrorCode 的偏离都必须被实现作为编译错误予以拒绝。

在 AUTOSAR Adaptive Platform 中,ara::core::Result<void, E> 用作调用组件与执行接口之间易出错过程和控制命令的标准化返回类型。该类代替了传统的 C++ 异常处理,提供了一种资源节约型、显式的错误传递方式,既支持直接状态查询,又支持调用路径中的函数式链式调用。

生命周期

ara::core::Result<void, E> 的实例在其整个生命周期中恰好处于两个离散状态之一:值状态(成功)或错误状态。使用 void 值的初始化通过默认构造函数 Result()([SWS_CORE_00821])或静态工厂方法 FromValue()([SWS_CORE_00831])完成。对于错误状态下的创建,提供了针对错误类型 E 的左值和右值的显式构造函数([SWS_CORE_00823]、[SWS_CORE_00824])。此外,工厂函数 FromError() 允许从错误左值([SWS_CORE_00834])、右值([SWS_CORE_00835])或通过参数包直接就地构造([SWS_CORE_00836])。

现有实例随后可以通过 EmplaceValue() 置于值状态([SWS_CORE_00843]),或通过 EmplaceError() 直接赋予新错误([SWS_CORE_00844])。拷贝和移动构造函数([SWS_CORE_00825]、[SWS_CORE_00826])以及相应的赋值运算符([SWS_CORE_00841]、[SWS_CORE_00842])在实例之间传递状态;Swap() 交换两个对象的内容([SWS_CORE_00845])。

析构函数 ~Result() 终止生命周期([SWS_CORE_00827]),并在 std::is_trivially_destructible<E>::value 成立时是平凡的。关于并发性,纯读取操作是线程安全的,而状态改变操作(如 EmplaceValue()、EmplaceError()、赋值或 Swap())不是线程安全的。

lifecycle Init WertZustand Wert-Zustand (void / Erfolg) Init->WertZustand Result(), FromValue() FehlerZustand Fehler-Zustand (E / Misserfolg) Init->FehlerZustand Result(e), FromError() WertZustand->FehlerZustand EmplaceError() FehlerZustand->WertZustand EmplaceValue()

状态图:值状态与错误状态之间的生命周期和状态转换。来源:[SWS_CORE_00821]、[SWS_CORE_00831]、[SWS_CORE_00823]、[SWS_CORE_00834]、[SWS_CORE_00843]、[SWS_CORE_00844]

使用路径

常规流程始于从函数调用中接收 ara::core::Result<void, E> 实例。调用方通过 HasValue()([SWS_CORE_00851])或转换 operator bool()([SWS_CORE_00852])对结果进行评估。执行成功时,可以通过 Bind()([SWS_CORE_00870])函数式地附加后续操作:Bind() 仅在实例包含值时才执行传入的可调用对象,并返回其转换后的结果。如果相反存在错误,则跳过被调用的函数,并将错误内容接纳到新结果中。

为了在通用代码中实现统一,该特化提供了形式上与常规 Result 类相对应的接口:Value()([SWS_CORE_00855])、operator*()([SWS_CORE_00853])和 ValueOr()([SWS_CORE_00861])不返回任何值并充当空操作(No-Op)方法。与此类似,Resolve()([SWS_CORE_00867])仅在存在错误时执行传入的可调用对象,而在成功情况下保持非活动状态。

用于操作检查和进一步处理的典型使用路径调用方DienstResult<void, E>Execute()FromValue() / FromError()Result<void, E>HasValue()boolaltHasValue() == true (Erfolg)Bind(f)HasValue() == false (Fehler)Error() / Err()Fehlerwert E / Optional<E>

时序图:调用、状态检查以及错误处理或链式传递的典型顺序。来源:[SWS_CORE_00851]、[SWS_CORE_00857]、[SWS_CORE_00868]、[SWS_CORE_00870]

错误场景

若实例处于错误状态,则可以通过 Error() 的重载作为引用查询所包含的错误([SWS_CORE_00857]、[SWS_CORE_00858]、[SWS_CORE_00876])。此时适用严格的前置条件:在不包含错误的实例上调用 Error() 构成 ResultWithNoErrorViolation。反之,在处于错误状态的实例上调用 Value()([SWS_CORE_00855])或 operator*()([SWS_CORE_00853])会触发 ResultWithNoValueViolation。

为了避免前置条件违规,提供了备选查询方法:Err() 返回打包在 ara::core::Optional<E> 中的错误,该容器在成功情况下保持为空([SWS_CORE_00868]、[SWS_CORE_00869])。通过 ErrorOr() 可以指定一个默认错误,若未包含错误则返回该默认错误([SWS_CORE_00863]、[SWS_CORE_00864])。对于针对特定错误值的检查,CheckError() 将内部错误与比较值进行比对([SWS_CORE_00865])。

如果首选基于异常的错误处理,ValueOrThrow()([SWS_CORE_00866])在出错时抛出与该错误关联的异常;若存在值,则调用正常返回。若工具链中禁用了 C++ 异常,则 ValueOrThrow() 不参与重载解析([SWS_CORE_00866])。

本指南基于 Release R25-11 中的 ara::core::Result<void, E> 规范自动生成。

成员图

类图

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

G nara__core__Result__void__E__788 Result< void, E > + Result() + operator=() + ~Result() + Bind() + CheckError() + EmplaceError() + EmplaceValue() + Err() + Error() + ErrorOr() + HasValue() + Resolve() + Swap() + Value() + ValueOr() + ValueOrThrow() … 4 weitere

详细视图

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

构造函数和析构函数

Result 函数 5

Construct a new Result with a void value

重载 Result 5
Result () noexcept; SWS_CORE_00821
explicit Result (const E &e) noexcept(std::is_nothrow_copy_ constructible< E >::value); SWS_CORE_00823
explicit Result (E &&e) noexcept(std::is_nothrow_move_constructible< E >::value); SWS_CORE_00824
Result (const Result &other) noexcept(std::is_nothrow_copy_ constructible< E >::value); SWS_CORE_00825
Result (Result &&other) noexcept(std::is_nothrow_move_constructible< E >::value); SWS_CORE_00826
~Result 函数

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

~Result () noexcept;

方法

Bind 函数

Call the given Callable, 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(); • XXX f(); meaning that the Callable either returns a Result<XXX, E> 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()) for a template argument F that returns a Result type, and it is Result<decltype(f()), 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 noexcept;

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);

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

template <typename... Args> void EmplaceValue (Args &&... args) noexcept;
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_00868
Optional< E > Err () &&noexcept(std::is_nothrow_constructible< Optional< E >, E && >::value); SWS_CORE_00869
Error 函数 3

Access the contained error.

重载 Error 3
const E & Error () const & noexcept; SWS_CORE_00857
E && Error () &&noexcept; SWS_CORE_00858
E & Error () & noexcept; SWS_CORE_00876
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_00863
template <typename G> E ErrorOr (G &&defaultError) &&noexcept(std::is_nothrow_move_ constructible< E >::value &&std::is_nothrow_constructible< E, G && >::value); SWS_CORE_00864
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_00834
static Result FromError (E &&e) noexcept(std::is_nothrow_move_ constructible< E >::value); SWS_CORE_00835
template <typename... Args> static Result FromError (Args &&... args) noexcept(std::is_nothrow_ constructible< E, Args... >::value); SWS_CORE_00836
FromValue 函数

Build a new Result with void as value

static Result FromValue () noexcept;
HasValue 函数

Check whether *this contains a value.

bool HasValue () const noexcept;
Resolve 函数

Do nothing or call a function. If *this contains a value, this function does nothing. Otherwise, the specified callable is invoked. The Callable is expected to be compatible to this interface: void f(const E&); This function only exists for helping with generic programming.

template <typename F> void Resolve (F &&f) const;
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 函数

This function only exists for helping with generic programming

void Value () const noexcept;
ValueOr 函数

Do nothing. This function only exists for helping with generic programming.

template <typename U> void ValueOr (U &&defaultValue) const noexcept;

Return the contained value or throw an exception.

void ValueOrThrow () const noexcept(false);

运算符

Check whether *this contains a value

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

Access the contained value.

void operator* () const noexcept;
operator= 函数 2

Copy-assign another ara::core::Result to this instance

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

类型别名

error_type 类型别名

Type alias for the type E of errors

using error_type = E;
value_type 类型别名

Type alias for the type T of values, always void for this specialization

using value_type = void;

方法文档

函数 Bind [SWS_CORE_00870] Upstream: RS_AP_00130

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

Call the given Callable, 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(); • XXX f(); meaning that the Callable either returns a Result<XXX, E> 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()) for a template argument F that returns a Result type, and it is Result<decltype(f()), 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

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

用法与调用上下文

来自 ara/core/result.h 的特化 ara::core::Result<void, E> 的成员函数 Bind 在没有结果值的成功实例上执行后续计算 [SWS_CORE_00870]。如果存在值,则同步且无参数地调用传入的 Callable f。该 Callable 必须满足接口 Result<XXX, E> f() 或 XXX f(),其中 XXX 必须是 Result 允许的类型 [SWS_CORE_00870]。如果 Callable 返回 Result,则返回类型对应于 decltype(f());如果它直接返回 XXX,则结果将被封装为 Result<decltype(f()), E> [SWS_CORE_00870]。

错误处理与并发

如果实例不包含值,则返回一个新的 Result<XXX, E>,原始错误会被复制到其中 [SWS_CORE_00870]。理解:在这种情况下,推测不应执行 Callable f。 问题 Q-6288a7106d2730c3 (未决)关于执行安全性,该函数被视为 not exception safe [SWS_CORE_00870]。线程安全性是有条件的(conditional),完全取决于传入的 Callable f 的线程安全性 [SWS_CORE_00870]。

与相关要求的交互

与来自 [SWS_CORE_00768] 和 [SWS_CORE_00941] 的主 Result<T, E> 函数不同(在那些函数中,Callable 通过 f(const T&) 接收实例的值),本重载 [SWS_CORE_00870] 将操作绑定到 void 结果,因此需要一个无参 Callable。

此使用说明是基于 AUTOSAR 规范状态 R25-11 自动生成的。

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, 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_00870
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00870@rel:R25-11#43844278
Content hash
43844278
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00870
Status: valid/unmigrated Version: rel:R25-11#e97c3561 Versionshistorie & Revisions (1 transition, 7 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_00870@rel:R25-11#e97c3561
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#609a669f2026-09-30
  • R20-11rel:R20-11#54a19d8c2026-10-14
  • R21-11rel:R21-11#54a19d8c2026-10-14
  • R22-11rel:R22-11#82ad4f452026-10-14
  • R23-11rel:R23-11#0661a5ee2026-10-14
  • R24-11rel:R24-11#1de461af2026-10-14
  • R25-11rel:R25-11#e97c35612026-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_00844] 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.

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

特化 ara::core::Result<void, E> 的成员函数 EmplaceError 根据传入实参 args [SWS_CORE_00844],同步地在现有实例中直接原位构造一个新的错误值。通过头文件 ara/core/result.h 提供的模板函数没有返回值,并在就地立即初始化 E 类型的错误对象 [SWS_CORE_00844]。

在错误处理和异常安全性方面,该操作被归类为有条件异常安全(conditionally exception safe)[SWS_CORE_00844]。通过说明符 noexcept(std::is_nothrow_constructible<E, Args...>::value) 保证无异常,前提是类型 E 可以使用类型 Args... 进行构造而不会产生 Exception [SWS_CORE_00844]。

关于并发性和边界条件,该成员函数被定义为非线程安全(not thread-safe)[SWS_CORE_00844]。如果多个线程竞态访问同一 Result 实例,推测需要外部同步机制以防止未协调的状态更改。 问题 Q-ffcb8ced860f6080 (未决)

在模块 core 的整体上下文中,[SWS_CORE_00844] 直接对应于同一函数的其他变体:对于主模板 ara::core::Result,在 [SWS_CORE_00744] 下指定了相同的行为,而对于引用类型 ara::core::Result<T&, E>,需求 [SWS_CORE_00916] 规定了相同的签名和语义。

本使用说明由 AI 基于 AUTOSAR R25-11 规范生成。

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, 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_00844
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00844@rel:R25-11#800f335c
Content hash
800f335c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00844
Status: valid/unmigrated Version: rel:R25-11#88f4eda1 Versionshistorie & Revisions (1 transition, 8 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_00844@rel:R25-11#88f4eda1
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#bf2f5b962026-09-30
  • R19-11rel:R19-11#4c83aff42026-10-14
  • R20-11rel:R20-11#458451b42026-10-14
  • R21-11rel:R21-11#a69891002026-10-14
  • R22-11rel:R22-11#139e999d2026-10-14
  • R23-11rel:R23-11#5bb406fd2026-10-14
  • R24-11rel:R24-11#88f4eda12026-10-14
  • R25-11rel:R25-11#88f4eda12026-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

函数 EmplaceValue [SWS_CORE_00843] Upstream: RS_AP_00130

template <typename... Args> void EmplaceValue (Args &&...               args) noexcept;

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

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

用法与调用上下文

模板成员函数 EmplaceValue 属于模块 core,并通过头文件 #include "ara/core/result.h" 针对特化 ara::core::Result<void, E> 进行定义 [SWS_CORE_00843]。其目的在于根据传入的实参直接在现有实例中生成或设置新值 args [SWS_CORE_00843]。执行过程是同步的,且不返回任何返回值(void)[SWS_CORE_00843]。由于特化的值类型为 void,该调用会将实例转换为成功状态;作为一种理解,接收 args 大概主要是为了与主模板类保持泛型签名兼容性。 问题 Q-b53ca5908f2517fb (未决)

错误处理与异常安全性

该函数被声明为 noexcept,并具有规范 exception safe [SWS_CORE_00843]。它不返回错误码,也不抛出异常。如果 Result 对象此前处于错误状态,该状态将被写入的值覆盖。

并发性与限制

该操作被标明为非线程安全(not thread-safe)[SWS_CORE_00843]。在对同一 ara::core::Result 实例进行潜在并发读或写访问时,调用方强制需要进行外部同步。

与相关规范的相互作用

相比于 [SWS_CORE_00743] 中针对 ara::core::Result<T, E> 的 EmplaceValue 通用实现(该实现仅为有条件异常安全,且其 noexcept 特性取决于 std::is_nothrow_constructible<T, Args...>::value),根据 [SWS_CORE_00843] 的 void 特化提供了无限制的 noexcept 和异常安全性保证。

本使用说明是根据 R25-11 的 AUTOSAR 规范自动生成的。

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, E >
Exception-Sicherheitexception 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 value

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CORE_00843
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00843@rel:R25-11#567ba766
Content hash
567ba766
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00843
Status: valid/unmigrated Version: rel:R25-11#96a7737d Versionshistorie & Revisions (1 transition, 8 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_00843@rel:R25-11#96a7737d
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#129ba0572026-09-30
  • R19-11rel:R19-11#b323d52c2026-10-14
  • R20-11rel:R20-11#93b34c042026-10-14
  • R21-11rel:R21-11#89a72b1b2026-10-14
  • R22-11rel:R22-11#a8be1c612026-10-14
  • R23-11rel:R23-11#34d2947b2026-10-14
  • R24-11rel:R24-11#ab2f88f32026-10-14
  • R25-11rel:R25-11#96a7737d2026-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_00868] 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.

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

类特化 ara::core::Result<void, E> 的成员函数 Err() const & 允许同步查询可能包含的错误状态([SWS_CORE_00868])。它通过头文件 ara/core/result.h 声明,且在调用时不需要传入参数([SWS_CORE_00868])。该函数返回一个 ara::core::Optional<E> 作为返回值,若对象表示一个错误,则该返回值包含具体的错误值([SWS_CORE_00868])。

在并发性和边界条件方面,该操作被显式指定为 thread-safe([SWS_CORE_00868])。关于异常安全性,该方法被视为有条件异常安全(conditionally exception safe)([SWS_CORE_00868])。当且仅当满足 std::is_nothrow_constructible<Optional<E>, const E&>::value 时,noexcept 保证才会生效([SWS_CORE_00868])。

在接口组合中,右值重载 Err() &&([SWS_CORE_00869])在 ara::core::Result<void, E> 内部补充了该函数。类似的左值与右值重载对也适用于主模板 ara::core::Result<T, E>([SWS_CORE_00772]、[SWS_CORE_00773])以及引用特化 ara::core::Result<T&, E>([SWS_CORE_00931]、[SWS_CORE_00932])。

此文本由 AI 基于 AUTOSAR 规范生成。

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, 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_00868
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00868@rel:R25-11#dfe7621b
Content hash
dfe7621b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00868
Status: valid/unmigrated Version: rel:R25-11#af27147a Versionshistorie & Revisions (1 transition, 7 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_00868@rel:R25-11#af27147a
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#144570032026-09-30
  • R20-11rel:R20-11#1575a8882026-10-14
  • R21-11rel:R21-11#1575a8882026-10-14
  • R22-11rel:R22-11#f054b0a72026-10-14
  • R23-11rel:R23-11#85d1a0ea2026-10-14
  • R24-11rel:R24-11#0001f71c2026-10-14
  • R25-11rel:R25-11#af27147a2026-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_00869] 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.

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

特化 ara::core::Result< void, E > 的成员函数 Err() && 提取可能存在的错误并将其作为 ara::core::Optional< E > 返回 [SWS_CORE_00869]。它通过头文件 ara/core/result.h 包含 [SWS_CORE_00869]。

关于用法和语义,以下属性适用:

  • 调用上下文与参数:该函数不接受任何参数,并且作为右值限定方法仅绑定到 ara::core::Result< void, E > 的右值实例 [SWS_CORE_00869]。Interpretation:通过右值语义(&&),调用时错误对象很可能会被移动到返回的 Optional 中。 问题 Q-b5a0098f77686ca6 (未决)
  • 返回值:生成的 ara::core::Optional< E > 包含错误值(如果对象中存在该错误值)[SWS_CORE_00869]。
  • 异常安全性与并发性:该操作被归类为有条件异常安全(conditionally exception safe),并在满足 std::is_nothrow_constructible< Optional< E >, E && >::value 时不抛出异常 [SWS_CORE_00869]。此外,该函数被指定为线程安全(thread-safe)[SWS_CORE_00869]。

在接口的相互协作中,该右值变体补充了同一特化 [SWS_CORE_00868] 的相应左值重载 Err() const &。主模板 ara::core::Result([SWS_CORE_00772]、[SWS_CORE_00773])以及引用特化 ara::core::Result< T &, E >([SWS_CORE_00931]、[SWS_CORE_00932])也存在类似的左值与右值方法对。

本文由 AI 创建,基于 AUTOSAR R25-11 的规范状态。

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, 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_00869
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00869@rel:R25-11#f9210daa
Content hash
f9210daa
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00869
Status: valid/unmigrated Version: rel:R25-11#b4c022c9 Versionshistorie & Revisions (1 transition, 7 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_00869@rel:R25-11#b4c022c9
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#1a48a8702026-09-30
  • R20-11rel:R20-11#2d7a35ca2026-10-14
  • R21-11rel:R21-11#cf11993e2026-10-14
  • R22-11rel:R22-11#b9330f822026-10-14
  • R23-11rel:R23-11#d9d839322026-10-14
  • R24-11rel:R24-11#520c6e5d2026-10-14
  • R25-11rel:R25-11#b4c022c92026-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_00857] Upstream: RS_AP_00130

const E & Error () const & noexcept;

Access the contained error.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, 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_00857
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00857@rel:R25-11#b109f38c
Content hash
b109f38c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00857
Status: valid/unmigrated Version: rel:R25-11#387fd43b Versionshistorie & Revisions (1 transition, 8 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_00857@rel:R25-11#387fd43b
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#0eaf7ea52026-09-30
  • R19-11rel:R19-11#b57e9caa2026-10-14
  • R20-11rel:R20-11#4844eb4b2026-10-14
  • R21-11rel:R21-11#4844eb4b2026-10-14
  • R22-11rel:R22-11#0b0dee212026-10-14
  • R23-11rel:R23-11#36f4e40e2026-10-14
  • R24-11rel:R24-11#387fd43b2026-10-14
  • R25-11rel:R25-11#387fd43b2026-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_00858] Upstream: RS_AP_00130

E && Error () &&noexcept;

Access the contained error.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, 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_00858
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00858@rel:R25-11#d29eb0f4
Content hash
d29eb0f4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00858
Status: valid/unmigrated Version: rel:R25-11#98daaaa9 Versionshistorie & Revisions (1 transition, 8 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_00858@rel:R25-11#98daaaa9
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#450345282026-09-30
  • R19-11rel:R19-11#d25659962026-10-14
  • R20-11rel:R20-11#2c3cfda32026-10-14
  • R21-11rel:R21-11#bfc21da42026-10-14
  • R22-11rel:R22-11#85b4e2f12026-10-14
  • R23-11rel:R23-11#dd2260e22026-10-14
  • R24-11rel:R24-11#98daaaa92026-10-14
  • R25-11rel:R25-11#98daaaa92026-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_00876] Upstream: RS_AP_00130

E & Error () & noexcept;

Access the contained error.

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, 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_00876
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00876@rel:R25-11#8bccb530
Content hash
8bccb530
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00876
Status: valid/unmigrated Version: rel:R25-11#048abd13 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_00876@rel:R25-11#048abd13
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#5dfbc7c52026-09-30
  • R23-11rel:R23-11#f6e4dde02026-10-14
  • R24-11rel:R24-11#048abd132026-10-14
  • R25-11rel:R25-11#048abd132026-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_00863] 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

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

特化 ara::core::Result<void, E> 的模板成员函数 ErrorOr 用于根据 [SWS_CORE_00863] 同步检索所包含的错误或备选默认错误。如果该实例已包含类型为 E 的错误值,则将其原样返回;否则,传入的参数 defaultError 将通过 static_cast 转换为错误类型 E 并返回 [SWS_CORE_00863]。

关于错误处理和并发性,适用以下特性:

  • 异常安全性:只要 E 的复制构造以及从通用引用类型 G&& 构造 E 均不抛出异常 (std::is_nothrow_copy_constructible<E>::value && std::is_nothrow_constructible<E, G&&>::value),该调用就是有条件异常安全的(conditionally exception safe)并声明为 noexcept [SWS_CORE_00863]。
  • 线程安全性:该操作被指定为线程安全(thread-safe)[SWS_CORE_00863]。由于它是常量左值引用重载 (const &),因此对同一实例的同时读取访问应该是安全的。 问题 Q-f95402c2e79ef590 (未决)
  • 头文件:该函数通过头文件 #include "ara/core/result.h" 提供 [SWS_CORE_00863]。

在 ara::core::Result 内部的交互中,[SWS_CORE_00863] 构成了针对 void 结果的右值重载 [SWS_CORE_00864] 的左值常量对等项,在右值重载中错误通过 std::move 传递。对于主类模板 Result<T, E>(通过 [SWS_CORE_00763] 和 [SWS_CORE_00764])以及引用类型 Result<T &, E>(通过 [SWS_CORE_00935] 和 [SWS_CORE_00936]),存在等价的重载。

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

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

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, 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_00863
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00863@rel:R25-11#ab951c0e
Content hash
ab951c0e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00863
Status: valid/unmigrated Version: rel:R25-11#cf2c41ab Versionshistorie & Revisions (1 transition, 8 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_00863@rel:R25-11#cf2c41ab
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#c418147a2026-09-30
  • R19-11rel:R19-11#89eb2b042026-10-14
  • R20-11rel:R20-11#83a977a92026-10-14
  • R21-11rel:R21-11#83a977a92026-10-14
  • R22-11rel:R22-11#c4caa8152026-10-14
  • R23-11rel:R23-11#8f9486662026-10-14
  • R24-11rel:R24-11#aea7d19f2026-10-14
  • R25-11rel:R25-11#cf2c41ab2026-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_00864] 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

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

用法与语义

特化 ara::core::Result<void, E> 的成员函数 ErrorOr 用于从右值实例([SWS_CORE_00864])中同步读取错误。调用该方法时,若 Result 对象包含错误,则会通过 std::move 将该错误移动至类型为 E 的返回值中。相反,如果存在成功结果,则传入的参数 defaultError 会通过 static_cast 转换为 E 并返回([SWS_CORE_00864])。

错误处理与异常安全性

该函数本身不会触发 DET 或 DEM 等传统 AUTOSAR 错误消息。在异常处理方面,ErrorOr 属于有条件异常安全(conditionally exception safe)。只要错误类型 E 可以无异常移动(std::is_nothrow_move_constructible<E>::value),且 E 可以从默认错误的通用引用类型 G&& 无异常构造([SWS_CORE_00864]),该函数就通过 noexcept 表达式得到保障。

并发性与交互

该方法被指定为 thread-safe([SWS_CORE_00864])。由于采用了右值引用限定符(rvalue-ref-qualifier)&&,调用该方法的前提是将 Result 对象作为右值传递。

在模块 core 中,该右值变体与其他形式组合存在:

本使用说明基于 AUTOSAR Adaptive R25-11 的规范要求自动生成。

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

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, 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_00864
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00864@rel:R25-11#28f02f17
Content hash
28f02f17
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00864
Status: valid/unmigrated Version: rel:R25-11#3a5225ab Versionshistorie & Revisions (1 transition, 7 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_00864@rel:R25-11#3a5225ab
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#c80a389f2026-09-30
  • R20-11rel:R20-11#7a0784612026-10-14
  • R21-11rel:R21-11#2ded9bb32026-10-14
  • R22-11rel:R22-11#68608ae42026-10-14
  • R23-11rel:R23-11#cf289b372026-10-14
  • R24-11rel:R24-11#6f41fd292026-10-14
  • R25-11rel:R25-11#3a5225ab2026-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_00834] 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)

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

使用

静态函数 FromError 是模板特化 ara::core::Result<void, E> 的组成部分,并通过头文件 ara/core/result.h 包含 [SWS_CORE_00834]。它作为同步工厂方法,用于从已存在的错误对象构造新的 Result [SWS_CORE_00834]。

  • 参数:输入参数 e 接收作为常量左值引用(const E &)的错误 [SWS_CORE_00834]。
  • 返回值:返回 Result 的实例,其中包含传入的错误 e [SWS_CORE_00834]。

错误处理与异常安全性

该规范未定义特定错误码,也未规定向 DET 或 DEM 发送报告 [SWS_CORE_00834]。该函数具有条件异常安全性(conditionally exception safe):当且仅当错误类型 E 可无抛异常复制(std::is_nothrow_copy_constructible<E>::value)时,它才保证为 noexcept [SWS_CORE_00834]。

并发性

该调用被归类为 thread-safe [SWS_CORE_00834]。解释:线程安全性可能涉及对象创建的内部流程,但前提是在复制过程中引用的源对象 e 不会被其他线程修改。 问题 Q-639cbb5cf8a64a0c (未决)

相互作用

在特化 ara::core::Result<void, E> 内,用于右值引用(E&&)[SWS_CORE_00835] 以及通过参数包进行就地构造 [SWS_CORE_00836] 的重载对该函数进行了补充;与此不同的是,这两者均被声明为 not thread-safe。针对未完全特化类型 ara::core::Result([SWS_CORE_00734]、[SWS_CORE_00735]、[SWS_CORE_00736])和引用特化([SWS_CORE_00905]、[SWS_CORE_00906]、[SWS_CORE_00907])也存在对应的重载。

本文由人工智能创建。应以 AUTOSAR 规范为准。

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

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, 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_00834
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00834@rel:R25-11#2e6178d2
Content hash
2e6178d2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00834
Status: valid/unmigrated Version: rel:R25-11#3daf7e83 Versionshistorie & Revisions (1 transition, 8 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_00834@rel:R25-11#3daf7e83
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#2713965d2026-09-30
  • R19-11rel:R19-11#988752d82026-10-14
  • R20-11rel:R20-11#a2ee7dff2026-10-14
  • R21-11rel:R21-11#f962d2622026-10-14
  • R22-11rel:R22-11#144f1dcf2026-10-14
  • R23-11rel:R23-11#80f1e27d2026-10-14
  • R24-11rel:R24-11#b400d0032026-10-14
  • R25-11rel:R25-11#3daf7e832026-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_00835] 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)

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

使用

静态函数 FromError 从作为右值传递的错误对象 e 同步创建 ara::core::Result<void, E> 的新实例 [SWS_CORE_00835]。该函数在头文件 ara/core/result.h 中定义,并返回包含错误值的 ara::core::Result [SWS_CORE_00835]。

错误处理与并发

该操作提供条件异常安全性(conditionally exception safe):如果错误类型 E 具有不抛出异常的移动构造函数(std::is_nothrow_move_constructible<E>::value),则它通过 noexcept 保证无异常 [SWS_CORE_00835]。该函数被归类为非线程安全(not thread-safe)[SWS_CORE_00835]。解释:这可能意味着必须保护要移动的右值对象免受来自其他线程的并发访问。 问题 Q-be29e8c3a7412b7a (未决)

相互作用

在特化 ara::core::Result<void, E> 内,此重载构成了左值复制函数 [SWS_CORE_00834] 和通过参数包就地构造 [SWS_CORE_00836] 的移动对应项。模块 core 中对于值类型 [SWS_CORE_00735] 和引用 [SWS_CORE_00906] 也存在类似的右值重载,并分别补充了左值变体([SWS_CORE_00734]、[SWS_CORE_00905])和就地变体([SWS_CORE_00736]、[SWS_CORE_00907])。

本文本由人工智能生成。

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

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, 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_00835
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00835@rel:R25-11#660b631b
Content hash
660b631b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00835
Status: valid/unmigrated Version: rel:R25-11#145c5d21 Versionshistorie & Revisions (1 transition, 8 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_00835@rel:R25-11#145c5d21
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#67ee0fc22026-09-30
  • R19-11rel:R19-11#764a522a2026-10-14
  • R20-11rel:R20-11#105b1f662026-10-14
  • R21-11rel:R21-11#105b1f662026-10-14
  • R22-11rel:R22-11#9e1a1db32026-10-14
  • R23-11rel:R23-11#018e31822026-10-14
  • R24-11rel:R24-11#355a98222026-10-14
  • R25-11rel:R25-11#145c5d212026-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_00836] 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

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

根据 [SWS_CORE_00836] 的静态模板函数 FromError 用于在特化 ara::core::Result<void, E> 内创建一个包含错误状态的 Result 对象,其类型为 E 的错误实例直接根据传入的参数 args 就地(“in-place”)构造。仅当 std::is_constructible<E, Args&&...>::value 为真,解包参数包的第一个类型既不匹配 E 也不是 Result 的特化时,该函数才参与重载决议 [SWS_CORE_00836]。

关于异常安全性,该函数被指定为具有条件异常安全性(“conditionally exception safe”):它被声明为 noexcept(std::is_nothrow_constructible<E, Args...>::value) [SWS_CORE_00836]。关于并发性,该调用被视为非线程安全(“not thread-safe”)[SWS_CORE_00836]。

在与类中其他函数配合使用时,此方法补充了通过已存在的左值([SWS_CORE_00834])或右值错误对象([SWS_CORE_00835])进行创建的重载。解释:关于 E 和 Result 的 SFINAE 限制可能旨在确保在传递已创建的错误或 Result 实例时优先选择各自的复制或移动运算符,并避免歧义。 问题 Q-2796f954bcaececa (未决)泛型类型 Result([SWS_CORE_00736])以及 Result<T&, E> 中的引用类型([SWS_CORE_00907])也存在类似的就地工厂函数。

本使用说明由 AI 基于 AUTOSAR 规范 R25-11 生成。

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

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, 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_00836
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00836@rel:R25-11#d5371817
Content hash
d5371817
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00836
Status: valid/unmigrated Version: rel:R25-11#469f77ff Versionshistorie & Revisions (1 transition, 8 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_00836@rel:R25-11#469f77ff
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#54c605942026-09-30
  • R19-11rel:R19-11#e8878fac2026-10-14
  • R20-11rel:R20-11#80c2b8ec2026-10-14
  • R21-11rel:R21-11#361c696d2026-10-14
  • R22-11rel:R22-11#57b6bd492026-10-14
  • R23-11rel:R23-11#99f912092026-10-14
  • R24-11rel:R24-11#dc85e51e2026-10-14
  • R25-11rel:R25-11#469f77ff2026-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_00831] Upstream: RS_AP_00130

static Result FromValue () noexcept;

Build a new Result with void as value

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

使用

静态成员函数 FromValue() 用于为模板特化 ara::core::Result<void, E> 生成一个成功的 ara::core::Result 对象 [SWS_CORE_00831]。由于结果类型 void 不传递有效数据,该函数不接受任何传入参数。该调用同步执行,并返回一个表示 void 值的 Result [SWS_CORE_00831]。其声明位于头文件 ara/core/result.h [SWS_CORE_00831] 中。

错误处理与异常安全性

该函数带有规范 noexcept,并被归类为完全异常安全(exception safe)[SWS_CORE_00831]。由于 FromValue() 按定义表示成功操作,因此它不会产生错误状态,也不返回错误码。针对此调用,未定义通过 DET 或 DEM 发送的特定错误消息。

并发性

根据规范,该函数被归类为线程安全(thread-safe)[SWS_CORE_00831]。无需额外的同步措施即可从多个线程中并行调用它。

相互作用

该无参签名专门用于 Result<void, E> [SWS_CORE_00831]。它与生成值的重载区分开来:

本使用说明是基于 AUTOSAR 规范自动生成的。

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

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

Rückgabewert

TypBeschreibung
Resulta Result that contains a void value

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

Record
AUTOSAR/AP/record/SWS_CORE_00831
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00831@rel:R25-11#c253be74
Content hash
c253be74
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00831
Status: valid/unmigrated Version: rel:R25-11#5cb92b73 Versionshistorie & Revisions (1 transition, 8 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_00831@rel:R25-11#5cb92b73
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#689d2bfa2026-09-30
  • R19-11rel:R19-11#5a0410bc2026-10-14
  • R20-11rel:R20-11#723058f02026-10-14
  • R21-11rel:R21-11#723058f02026-10-14
  • R22-11rel:R22-11#e288be5e2026-10-14
  • R23-11rel:R23-11#da3844d72026-10-14
  • R24-11rel:R24-11#43b26bc52026-10-14
  • R25-11rel:R25-11#5cb92b732026-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_00851] 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< void, 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_00851
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00851@rel:R25-11#badb9c5e
Content hash
badb9c5e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00851
Status: valid/unmigrated Version: rel:R25-11#3fbe93cd Versionshistorie & Revisions (1 transition, 8 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_00851@rel:R25-11#3fbe93cd
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b31a90de2026-09-30
  • R19-11rel:R19-11#c3eea99c2026-10-14
  • R20-11rel:R20-11#0d72fc562026-10-14
  • R21-11rel:R21-11#d1f577762026-10-14
  • R22-11rel:R22-11#dfceca0a2026-10-14
  • R23-11rel:R23-11#c8bbd1082026-10-14
  • R24-11rel:R24-11#3fbe93cd2026-10-14
  • R25-11rel:R25-11#3fbe93cd2026-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_00867] Upstream: RS_AP_00130

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

Do nothing or call a function. If *this contains a value, this function does nothing. Otherwise, the specified callable is invoked. The Callable is expected to be compatible to this interface: void f(const E&); This function only exists for helping with generic programming.

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

模板类 ara::core::Result<void, E> 的成员函数 Resolve 用于泛型编程上下文中的错误处理 [SWS_CORE_00867]。当 Result 的实例包含常规值时,调用不执行任何操作 [SWS_CORE_00867]。如果实例转而包含错误,则会调用作为参数传入的 Callable f [SWS_CORE_00867]。

传入的 Callable f 必须与函数签名 void f(const E&) 兼容,其中 E 表示错误类型 [SWS_CORE_00867]。函数 Resolve 本身不提供返回值(void)[SWS_CORE_00867]。关于执行安全性,该函数被指定为非异常安全(“not exception safe”)[SWS_CORE_00867]。其线程安全性是有条件的,直接取决于传入的 Callable f 的线程安全性 [SWS_CORE_00867]。

在整个系统中,此特化不同于 ara::core::Result<T, E> [SWS_CORE_00767] 中针对值类型以及 ara::core::Result<T&, E> [SWS_CORE_00939]、[SWS_CORE_00940] 中针对引用类型的常规 Resolve 函数:那些变体返回所包含的值或 Callable 调用的结果,而无返回值的 void 重载仅作为用于统一接口调用的泛型构建块而存在 [SWS_CORE_00867]。

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

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, 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
None

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

Record
AUTOSAR/AP/record/SWS_CORE_00867
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00867@rel:R25-11#775d7599
Content hash
775d7599
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00867
Status: valid/unmigrated Version: rel:R25-11#f761b703 Versionshistorie & Revisions (1 transition, 8 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_00867@rel:R25-11#f761b703
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#4dc104212026-09-30
  • R19-11rel:R19-11#f881257b2026-10-14
  • R20-11rel:R20-11#b5e6d3a02026-10-14
  • R21-11rel:R21-11#849753782026-10-14
  • R22-11rel:R22-11#3a188f872026-10-14
  • R23-11rel:R23-11#ffe34e102026-10-14
  • R24-11rel:R24-11#14ada29b2026-10-14
  • R25-11rel:R25-11#f761b7032026-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_00821] Upstream: RS_AP_00130

Result () noexcept;

Construct a new Result with a void value

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

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

Record
AUTOSAR/AP/record/SWS_CORE_00821
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00821@rel:R25-11#f22f96e7
Content hash
f22f96e7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00821
Status: valid/unmigrated Version: rel:R25-11#98c2292a Versionshistorie & Revisions (1 transition, 8 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_00821@rel:R25-11#98c2292a
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#8f90f5152026-09-30
  • R19-11rel:R19-11#f7225b752026-10-14
  • R20-11rel:R20-11#361176672026-10-14
  • R21-11rel:R21-11#6526f8642026-10-14
  • R22-11rel:R22-11#270117af2026-10-14
  • R23-11rel:R23-11#3ecdef242026-10-14
  • R24-11rel:R24-11#a88bc15b2026-10-14
  • R25-11rel:R25-11#98c2292a2026-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_00823] 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< void, 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_00823
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00823@rel:R25-11#77c2ea3f
Content hash
77c2ea3f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00823
Status: valid/unmigrated Version: rel:R25-11#520a2342 Versionshistorie & Revisions (1 transition, 8 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_00823@rel:R25-11#520a2342
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#7e409bbe2026-09-30
  • R19-11rel:R19-11#2c11f1a02026-10-14
  • R20-11rel:R20-11#b385f1852026-10-14
  • R21-11rel:R21-11#b385f1852026-10-14
  • R22-11rel:R22-11#964654b92026-10-14
  • R23-11rel:R23-11#41f3fe502026-10-14
  • R24-11rel:R24-11#c47ff58a2026-10-14
  • R25-11rel:R25-11#520a23422026-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_00824] 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< void, 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_00824
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00824@rel:R25-11#2ebbeaea
Content hash
2ebbeaea
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00824
Status: valid/unmigrated Version: rel:R25-11#a8739538 Versionshistorie & Revisions (1 transition, 8 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_00824@rel:R25-11#a8739538
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#3dae56032026-09-30
  • R19-11rel:R19-11#b547aacc2026-10-14
  • R20-11rel:R20-11#587e8ca22026-10-14
  • R21-11rel:R21-11#ef34c2e22026-10-14
  • R22-11rel:R22-11#6fba39dd2026-10-14
  • R23-11rel:R23-11#ed7afc722026-10-14
  • R24-11rel:R24-11#a35944a82026-10-14
  • R25-11rel:R25-11#a87395382026-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_00825] 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< void, 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_00825
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00825@rel:R25-11#20ad42c7
Content hash
20ad42c7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00825
Status: valid/unmigrated Version: rel:R25-11#49078b0a Versionshistorie & Revisions (1 transition, 8 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_00825@rel:R25-11#49078b0a
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#2a88503c2026-09-30
  • R19-11rel:R19-11#9e2629602026-10-14
  • R20-11rel:R20-11#c7e3d2b52026-10-14
  • R21-11rel:R21-11#c7e3d2b52026-10-14
  • R22-11rel:R22-11#2141ea872026-10-14
  • R23-11rel:R23-11#984e76b52026-10-14
  • R24-11rel:R24-11#01d7557e2026-10-14
  • R25-11rel:R25-11#49078b0a2026-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_00826] 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< void, 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_00826
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00826@rel:R25-11#7fe93259
Content hash
7fe93259
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00826
Status: valid/unmigrated Version: rel:R25-11#884cd9f5 Versionshistorie & Revisions (1 transition, 8 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_00826@rel:R25-11#884cd9f5
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#54a41baf2026-09-30
  • R19-11rel:R19-11#a66ea3dc2026-10-14
  • R20-11rel:R20-11#3f38aa642026-10-14
  • R21-11rel:R21-11#256f91a42026-10-14
  • R22-11rel:R22-11#beedc4732026-10-14
  • R23-11rel:R23-11#192a01fe2026-10-14
  • R24-11rel:R24-11#019dfd3e2026-10-14
  • R25-11rel:R25-11#884cd9f52026-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_00845] 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

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

成员函数 Swap 将当前实例的内容与传入的引用 other 同步交换 [SWS_CORE_00845]。它属于来自头文件 ara/core/result.h 的特化 ara::core::Result<void, E> 的作用域,并且没有返回值 [SWS_CORE_00845]。

在错误处理方面,该操作被归类为有条件异常安全(conditionally exception safe)[SWS_CORE_00845]。断言 noexcept 恰好在错误类型 E 既可 nothrow 移动构造(std::is_nothrow_move_constructible<E>::value)又可 nothrow 移动赋值(std::is_nothrow_move_assignable<E>::value)时生效 [SWS_CORE_00845]。针对该调用,未规定特定错误码或向 DET 或 DEM 发送通知 [SWS_CORE_00845]。

关于并发性,Swap 被明确指定为非线程安全(not thread-safe)[SWS_CORE_00845]。因此,在没有外部同步的情况下并发访问相同实例可能会导致数据竞争。 问题 Q-a8d4f130648765df (未决)

在 ara::core 内部的协作中,该方法为非成员模板函数 ara::core::swap 奠定了基础,后者的 noexcept 条件直接耦合到该成员函数 [SWS_CORE_00796]。类似的交换操作存在于泛型类型 ara::core::Result<T, E> [SWS_CORE_00745]、引用特化 ara::core::Result<T&, E> [SWS_CORE_00917] 以及 Promise 对象 [SWS_CORE_00352] [SWS_CORE_06352] 中。

此文本由 AI 基于 AUTOSAR 规范生成。

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, 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_00845
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00845@rel:R25-11#2b400226
Content hash
2b400226
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00845
Status: valid/unmigrated Version: rel:R25-11#1c4f5e03 Versionshistorie & Revisions (1 transition, 8 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_00845@rel:R25-11#1c4f5e03
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#0474393e2026-09-30
  • R19-11rel:R19-11#b5afc4f72026-10-14
  • R20-11rel:R20-11#71c2bf362026-10-14
  • R21-11rel:R21-11#71c2bf362026-10-14
  • R22-11rel:R22-11#5de901772026-10-14
  • R23-11rel:R23-11#dd6258592026-10-14
  • R24-11rel:R24-11#80da0ae72026-10-14
  • R25-11rel:R25-11#1c4f5e032026-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_00855] Upstream: RS_AP_00130

void Value () const noexcept;

This function only exists for helping with generic programming

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

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CORE_00855
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00855@rel:R25-11#f26acdc1
Content hash
f26acdc1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00855
Status: valid/unmigrated Version: rel:R25-11#672ec24a Versionshistorie & Revisions (1 transition, 8 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_00855@rel:R25-11#672ec24a
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#4c2667a52026-09-30
  • R19-11rel:R19-11#7dbbbf242026-10-14
  • R20-11rel:R20-11#8431fc372026-10-14
  • R21-11rel:R21-11#8431fc372026-10-14
  • R22-11rel:R22-11#9c8d89402026-10-14
  • R23-11rel:R23-11#41c02b182026-10-14
  • R24-11rel:R24-11#a44cc9b82026-10-14
  • R25-11rel:R25-11#672ec24a2026-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_00861] Upstream: RS_AP_00130

template <typename U> void ValueOr (U &&defaultValue) const noexcept;

Do nothing. This function only exists for helping with generic programming.

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

特化 ara::core::Result<void, E> 的成员函数 ValueOr 主要用于简化泛型编程模式,在执行时不执行任何操作([SWS_CORE_00861])。该方法通过头文件 ara/core/result.h 提供,同步接收一个转发类型 U&& 的参数 defaultValue,且不返回任何返回值(void)([SWS_CORE_00861])。

在并发性和异常行为方面,该成员函数被指定为线程安全(thread-safe),并采用说明符语法 noexcept 进行声明,从而保证了完全的异常安全性([SWS_CORE_00861])。由于不进行错误状态检查且不发生任何动作,因此既不存在错误码,也不存在向 DET 或 DEM 的报告。

在与 Result 的其余形式协作中,该函数补充了 ValueOr 基于值的重载([SWS_CORE_00761]、[SWS_CORE_00762])和基于引用的重载([SWS_CORE_00933]、[SWS_CORE_00934])。当设置了值时,那些函数会返回该值,否则会转换并交付传入的替代值,而该变体则代表了不带值返回的操作的中立对应项([SWS_CORE_00861])。理解:传入的值 defaultValue 在实现中大概会被未加使用地丢弃。 问题 Q-6097af779219e859 (未决)这使得开发人员能够编写泛型模板算法,而无需针对 Result<void, E> 进行特殊分支处理。

本文本由人工智能生成。

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

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, E >
Exception-Sicherheitexception 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
None

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

Record
AUTOSAR/AP/record/SWS_CORE_00861
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00861@rel:R25-11#0021fe70
Content hash
0021fe70
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00861
Status: valid/unmigrated Version: rel:R25-11#b2e122de Versionshistorie & Revisions (1 transition, 8 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_00861@rel:R25-11#b2e122de
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#74deb1e42026-09-30
  • R19-11rel:R19-11#fbb02ae32026-10-14
  • R20-11rel:R20-11#da14f35c2026-10-14
  • R21-11rel:R21-11#f436d8732026-10-14
  • R22-11rel:R22-11#88784c622026-10-14
  • R23-11rel:R23-11#b4651d592026-10-14
  • R24-11rel:R24-11#b2e122de2026-10-14
  • R25-11rel:R25-11#b2e122de2026-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_00866] Upstream: RS_AP_00130

void ValueOrThrow () const noexcept(false);

Return the contained value or throw an exception.

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

模板特化 ara::core::Result<void, E> 的成员函数 ValueOrThrow 用于同步检查操作结果 [SWS_CORE_00866]。由于值类型为 void,因此该函数不带参数且不返回任何值 [SWS_CORE_00866]。该声明通过头文件 ara/core/result.h 提供 [SWS_CORE_00866]。

在成功时,该方法正常返回;如果存在错误状态,则抛出与所包含错误关联的异常类型的异常(noexcept(false))[SWS_CORE_00866]。关于异常安全性,该操作被指定为 not exception safe [SWS_CORE_00866]。

对于调用上下文和并发性,适用以下约束条件:

在与模块 core 的交互中,此 void 特化补充了 ara::core::Result<T, E> 的通用重载——这些重载返回所包含值的引用([SWS_CORE_00766]、[SWS_CORE_00769]、[SWS_CORE_00778])——以及引用类型的特化 ara::core::Result<T&, E>([SWS_CORE_00938]、[SWS_CORE_00949])。

本文本由 AI 生成,完全基于 AUTOSAR R25-11 的规范数据。

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

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

Rückgabewert

TypBeschreibung
None

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_00866
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00866@rel:R25-11#27e18d0a
Content hash
27e18d0a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00866
Status: valid/unmigrated Version: rel:R25-11#02430c8c Versionshistorie & Revisions (1 transition, 8 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_00866@rel:R25-11#02430c8c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b509b5f62026-09-30
  • R19-11rel:R19-11#2b3715602026-10-14
  • R20-11rel:R20-11#015d6e892026-10-14
  • R21-11rel:R21-11#015d6e892026-10-14
  • R22-11rel:R22-11#3a3be3ac2026-10-14
  • R23-11rel:R23-11#1c0991192026-10-14
  • R24-11rel:R24-11#a22c0e742026-10-14
  • R25-11rel:R25-11#02430c8c2026-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 bool [SWS_CORE_00852] 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< void, 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_00852
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00852@rel:R25-11#6be686c3
Content hash
6be686c3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00852
Status: valid/unmigrated Version: rel:R25-11#308b54bc Versionshistorie & Revisions (1 transition, 8 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_00852@rel:R25-11#308b54bc
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#20945fcd2026-09-30
  • R19-11rel:R19-11#94ca04482026-10-14
  • R20-11rel:R20-11#15f004bc2026-10-14
  • R21-11rel:R21-11#4bc654032026-10-14
  • R22-11rel:R22-11#dceddefe2026-10-14
  • R23-11rel:R23-11#1bf0f6eb2026-10-14
  • R24-11rel:R24-11#e07d70b42026-10-14
  • R25-11rel:R25-11#308b54bc2026-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_00853] Upstream: RS_AP_00130

void operator* () const noexcept;

Access the contained value.

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

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CORE_00853
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00853@rel:R25-11#cc73ca40
Content hash
cc73ca40
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00853
Status: valid/unmigrated Version: rel:R25-11#570827f3 Versionshistorie & Revisions (1 transition, 8 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_00853@rel:R25-11#570827f3
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#0bbf5d3b2026-09-30
  • R19-11rel:R19-11#f9dde3982026-10-14
  • R20-11rel:R20-11#1f3399df2026-10-14
  • R21-11rel:R21-11#1f3399df2026-10-14
  • R22-11rel:R22-11#6b2cf1872026-10-14
  • R23-11rel:R23-11#acae00652026-10-14
  • R24-11rel:R24-11#570827f32026-10-14
  • R25-11rel:R25-11#570827f32026-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_00841] 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-assign another ara::core::Result to this instance

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, 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_00841
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00841@rel:R25-11#46005473
Content hash
46005473
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00841
Status: valid/unmigrated Version: rel:R25-11#4cd1fad8 Versionshistorie & Revisions (1 transition, 8 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_00841@rel:R25-11#4cd1fad8
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#6d1166182026-09-30
  • R19-11rel:R19-11#20dff6262026-10-14
  • R20-11rel:R20-11#c03d77e62026-10-14
  • R21-11rel:R21-11#38acfa3b2026-10-14
  • R22-11rel:R22-11#e977e11e2026-10-14
  • R23-11rel:R23-11#495ec7c02026-10-14
  • R24-11rel:R24-11#2d78586d2026-10-14
  • R25-11rel:R25-11#4cd1fad82026-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_00842] Upstream: RS_AP_00130

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

Move-assign another ara::core::Result to this instance

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

Parameter (in)

ParameterBeschreibung
otherthe other instance

Rückgabewert

TypBeschreibung
Result &*this, containing the contents ofother

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

Record
AUTOSAR/AP/record/SWS_CORE_00842
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00842@rel:R25-11#69e9785d
Content hash
69e9785d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00842
Status: valid/unmigrated Version: rel:R25-11#7b894013 Versionshistorie & Revisions (1 transition, 8 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_00842@rel:R25-11#7b894013
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#1757cb292026-09-30
  • R19-11rel:R19-11#b5fa5dc82026-10-14
  • R20-11rel:R20-11#215e92592026-10-14
  • R21-11rel:R21-11#215e92592026-10-14
  • R22-11rel:R22-11#385162782026-10-14
  • R23-11rel:R23-11#b1034a412026-10-14
  • R24-11rel:R24-11#035424de2026-10-14
  • R25-11rel:R25-11#7b8940132026-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_00827] 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< void, 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_00827
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00827@rel:R25-11#07c000d4
Content hash
07c000d4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00827
Status: valid/unmigrated Version: rel:R25-11#7779bc25 Versionshistorie & Revisions (1 transition, 8 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_00827@rel:R25-11#7779bc25
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#ada359e32026-09-30
  • R19-11rel:R19-11#bcc401122026-10-14
  • R20-11rel:R20-11#38c9347c2026-10-14
  • R21-11rel:R21-11#27ebdb022026-10-14
  • R22-11rel:R22-11#04a4095e2026-10-14
  • R23-11rel:R23-11#f7addf512026-10-14
  • R24-11rel:R24-11#da8ad7bd2026-10-14
  • R25-11rel:R25-11#7779bc252026-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_00865] Upstream: RS_AP_00130

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

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()

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

特化 ara::core::Result<void, E> 的模板成员函数 CheckError 同步检查当前实例是否包含特定错误 [SWS_CORE_00865]。为此,传入的实参 error 通过 static_cast 转换为错误类型 E,并与内部错误状态 Error() 的返回值进行比较 [SWS_CORE_00865]。调用通过头文件 #include "ara/core/result.h" [SWS_CORE_00865] 进行。

以下属性适用于使用和调用上下文:

  • 参数和返回值:类型为 G&& 的通用引用参数 error 接收要检查的错误 [SWS_CORE_00865]。如果实例包含与 error 等价的错误,则该函数返回 true,否则返回 false [SWS_CORE_00865]。
  • 并发性和异常安全性:该操作被声明为 const noexcept,被视为异常安全(exception safe),并且可以完全线程安全(thread-safe)地调用 [SWS_CORE_00865]。

在与模块 core 的协作中,存在 CheckError 的类似重载:主模板类 ara::core::Result 同样以线程安全且异常安全的方式通过 noexcept 提供相同的签名 [SWS_CORE_00765]。相比之下,引用特化 ara::core::Result<T&, E> 虽然具有相同的比较机制并且是线程安全的,但明确不带 noexcept,被指定为非异常安全(not exception safe)[SWS_CORE_00937]。

此使用说明是基于规范要求自动生成的。

Header-Datei#include "ara/core/result.h"
Scopeclass ara::core::Result< void, E >
Exception-Sicherheitexception 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_00865
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00865@rel:R25-11#cb0c130b
Content hash
cb0c130b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00865
Status: valid/unmigrated Version: rel:R25-11#0cc61151 Versionshistorie & Revisions (1 transition, 8 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_00865@rel:R25-11#0cc61151
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#629602bb2026-09-30
  • R19-11rel:R19-11#caaed37b2026-10-14
  • R20-11rel:R20-11#c831c1642026-10-14
  • R21-11rel:R21-11#38bde79d2026-10-14
  • R22-11rel:R22-11#d5b8d12d2026-10-14
  • R23-11rel:R23-11#772c40092026-10-14
  • R24-11rel:R24-11#a6e6635b2026-10-14
  • R25-11rel:R25-11#0cc611512026-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_00812] 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< void, E >
Symbolerror_type

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

Record
AUTOSAR/AP/record/SWS_CORE_00812
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00812@rel:R25-11#558c3878
Content hash
558c3878
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00812
Status: valid/unmigrated Version: rel:R25-11#1fba764b Versionshistorie & Revisions (1 transition, 8 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_00812@rel:R25-11#1fba764b
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#32aa6a1c2026-09-30
  • R19-11rel:R19-11#344c236b2026-10-14
  • R20-11rel:R20-11#d7c47e392026-10-14
  • R21-11rel:R21-11#d7c47e392026-10-14
  • R22-11rel:R22-11#896231bd2026-10-14
  • R23-11rel:R23-11#8c3b22132026-10-14
  • R24-11rel:R24-11#8c3b22132026-10-14
  • R25-11rel:R25-11#1fba764b2026-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_00811] Upstream: RS_AP_00130

using value_type = void;

Type alias for the type T of values, always void for this specialization

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

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

Record
AUTOSAR/AP/record/SWS_CORE_00811
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00811@rel:R25-11#55b5ff26
Content hash
55b5ff26
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00811
Status: valid/unmigrated Version: rel:R25-11#b5a93a85 Versionshistorie & Revisions (1 transition, 8 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_00811@rel:R25-11#b5a93a85
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#881c160a2026-09-30
  • R19-11rel:R19-11#f4870d0d2026-10-14
  • R20-11rel:R20-11#84ab65ba2026-10-14
  • R21-11rel:R21-11#618d46342026-10-14
  • R22-11rel:R22-11#27f9f9602026-10-14
  • R23-11rel:R23-11#19a6434e2026-10-14
  • R24-11rel:R24-11#19a6434e2026-10-14
  • R25-11rel:R25-11#b5a93a852026-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