फ़ंक्शन 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]।
संबंधित आवश्यकताओं के साथ परस्पर क्रिया
[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" |
|---|---|
| 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#114933c8- Content hash
114933c8- 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 · जर्मन मूल