함수 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
사용법 및 호출 컨텍스트
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].
관련 요구 사항과의 상호 작용
Callable이 f(const T&)을(를) 통해 인스턴스의 값을 수신하는 [SWS_CORE_00768] 및 [SWS_CORE_00941]의 기본 Result<T, E> 함수와 달리, 본 오버로드 [SWS_CORE_00870]은(는) 연산을 void 결과에 바인딩하므로 매개변수가 없는 Callable을 요구합니다.
이 사용 지침은 AUTOSAR 사양 버전 R25-11을 바탕으로 자동 생성되었습니다.
| Header-Datei | #include "ara/core/result.h" |
|---|---|
| Scope | class ara::core::Result< void, E > |
| Exception-Sicherheit | not exception safe |
| Thread-Sicherheit | conditional, depends on thread safety of f |
Template-Parameter
| Parameter | Beschreibung |
|---|---|
| F | the type of the Callable f |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| f | the Callable |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| <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#55ab2dab- Content hash
55ab2dab- 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
Recorded Revisions (7):
- R25-11
rel:R25-11#609a669f2026-09-30 - R20-11
rel:R20-11#54a19d8c2026-10-14 - R21-11
rel:R21-11#54a19d8c2026-10-14 - R22-11
rel:R22-11#82ad4f452026-10-14 - R23-11
rel:R23-11#0661a5ee2026-10-14 - R24-11
rel:R24-11#1de461af2026-10-14 - R25-11
rel:R25-11#e97c35612026-10-14 active
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
gemini-3.8-flash-low· 2026-10-13 · 독일어 원문