DEENESPTFRRUARHIKOZHNL

类 ara::core::Bitset

[SWS_CORE_01701]

template <std::size_t N> class Bitset {...};

Implementation of std::bitset type from [bitset]

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

用户指南人工智能生成

为 Adaptive Core 提供符合标准、具有 noexcept 保证且固定大小的类型安全位域抽象。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: ae7240ca6617 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

为 Adaptive Core 提供符合标准、具有 noexcept 保证且固定大小的类型安全位域抽象。

类模板 ara::core::Bitset 为固定大小的位序列提供了适配 AUTOSAR Adaptive 的 std::bitset 实现 [SWS_CORE_01741]。它提供了全面的位操作运算、逻辑运算以及转换为标量整数类型的优化转换,并具有严格的 noexcept 保证 [SWS_CORE_01738]。基于位置的修改通过 ara::core::Result 报告无效索引而非抛出 C++ 异常,而转换则确定性地处理溢出错误。因此,该类特别适用于资源高效且具故障容容性的 ECU 功能。

上下文

模板类 ara::core::Bitset 在 Adaptive Platform 中为编译期确定长度 N 的位序列提供了 C++ 标准类型 std::bitset 的实现 [SWS_CORE_01741]。在 AUTOSAR 生态系统中,该类用于在 ECU 上高性能且类型安全地处理位域、状态掩码和标志寄存器。它通过支持平台特定类型 ara::core::BasicString 代替 std::basic_string,无缝集成到模块 core 的类型系统中 [SWS_CORE_01749]、[SWS_CORE_01751]。此外,AUTOSAR 扩展了标准化接口,增加了专用于转换为无符号固定宽度整数类型(如 std::uint8_t、std::uint16_t、std::uint32_t 和 std::uint64_t)的转换函数 [SWS_CORE_01736]、[SWS_CORE_01737]、[SWS_CORE_01738]、[SWS_CORE_01739]。

生命周期

实例的创建通过多个构造函数灵活完成。默认构造函数将所有 N 位初始化为零值,并声明为 constexpr 以及 noexcept [SWS_CORE_01713]。或者,可以从 unsigned long long 类型的标量值 [SWS_CORE_01719],或基于文本从 ara::core::BasicString [SWS_CORE_01749] 或以 null 结尾的字符串指针 const CharT* 实例化 Bitset [SWS_CORE_01750]。提供了拷贝和移动构造函数,并定义为 noexcept=default [SWS_CORE_01714]、[SWS_CORE_01716]。同样也提供了相应的赋值运算符 [SWS_CORE_01715]、[SWS_CORE_01717]。析构函数被指定为 noexcept 且是线程安全的 [SWS_CORE_01718]。在并发性方面,整数转换函数同样是线程安全的 [SWS_CORE_01736]、[SWS_CORE_01737],而对同一 Bitset 实例的修改访问必须进行同步。

使用路径

典型的使用路径包括实例化、随后操作单个位或位掩码,以及最后对位域进行求值或转换:

Typischer Nutzungspfad von ara::core::Bitset应用ara::core::BitsetUse Case: InitialisierungBitset(val)Instanz erzeugtUse Case: Bit-Manipulationset(pos, true)Result<Bitset&>flip()Bitset&Use Case: 状态检查与转换test(pos)boolto_uint32t()std::uint32_t Wert

时序图:初始化、操作、求值和转换 Bitset 时的典型交互顺序。来源:[SWS_CORE_01719]、[SWS_CORE_01726]、[SWS_CORE_01730]、[SWS_CORE_01743]、[SWS_CORE_01738]

错误场景

与 std::bitset 相比,ara::core::Bitset 采用了无异常(noexcept)的容错、确定性错误处理概念:

  • 位置访问越界:在修改函数 set(pos) [SWS_CORE_01726]、reset(pos) [SWS_CORE_01728] 和 flip(pos) [SWS_CORE_01731] 中,使用了返回类型 Result<Bitset<N>&>。若 pos 超出有效范围,则会报告 IsoStdOutOfRangeViolation 而非 std::out_of_range。解释:一致使用 ara::core::Result 和 noexcept 推测是为了遵循 Adaptive Platform 安全关键领域中严格的无异常要求。 问题 Q-322c53fff705bce6 (未决)检查函数 test(pos) 在 pos 无效时也会指示 IsoStdOutOfRangeViolation [SWS_CORE_01743]。
  • 无效字符串:从 ara::core::BasicString [SWS_CORE_01749] 构造时,若出现 pos > size() 会触发 IsoStdOutOfRangeViolation,若出现不等于 0 或 1 的字符则会触发 IsoStdInvalidArgumentViolation(而非 std::invalid_argument)。
  • 数值溢出:如果所表示的位状态无法在所请求的目标类型中表示,则转换函数 to_uint8t [SWS_CORE_01736]、to_uint16t [SWS_CORE_01737]、to_uint32t [SWS_CORE_01738]、to_uint64t [SWS_CORE_01739]、to_ulong [SWS_CORE_01734] 和 to_ullong [SWS_CORE_01735] 将分别报告 IsoStdOverflowErrorViolation 而非 std::overflow_error。
  • 受限的异常安全性:虽然大多数操作均为 noexcept 且是异常安全的,但从指针构造 const CharT* [SWS_CORE_01750] 以及使用 to_string [SWS_CORE_01751] 导出被明确归类为非异常安全(not exception safe)。

本类指南基于 AUTOSAR Adaptive Release R25-11 规范自动生成。

成员图

类图

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

G nara__core__Bitset255 Bitset + Bitset() + operator=() + ~Bitset() + size() + to_string() + to_uint16t() + to_uint32t() + to_uint64t() + to_uint8t() + to_ullong() + to_ulong() + all() + any() + count() + none() + operator[]() … 13 weitere

详细视图

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

构造函数和析构函数

Bitset 函数 6

≙ [bitset]

重载 Bitset 6
constexpr Bitset () noexcept=default; SWS_CORE_01713
Bitset (const Bitset &) noexcept=default; SWS_CORE_01714
Bitset (Bitset &&) noexcept=default; SWS_CORE_01716
constexpr Bitset (unsigned long long val) noexcept; SWS_CORE_01719
template <class CharT, class Traits, class Allocator> explicit Bitset (const BasicString< Allocator > &str, typename Basic String< Allocator >::size_type pos=0, typename BasicString< Allocator >::size_type n=BasicString< Allocator >::npos, CharT zero=CharT(’0’), CharT one=CharT(’1’)) noexcept; SWS_CORE_01749
template <class CharT> explicit Bitset (const CharT *str, typename BasicString< CharT >::size_type n=BasicString< CharT >::npos, CharT zero=CharT(’0’), Char T one=CharT(’1’)); SWS_CORE_01750
~Bitset 函数

[AUTOSAR defined] not present in ISO-14882. Destructor

~Bitset () noexcept;

方法

all 函数

≙ [bitset]

bool all () const noexcept;
any 函数

≙ [bitset]

bool any () const noexcept;
count 函数

≙ [bitset]

std::size_t count () const noexcept;
flip 函数 2

≙ [bitset]

重载 flip 2
Bitset< N > & flip () noexcept; SWS_CORE_01730
Result< Bitset< N > & > flip (std::size_t pos) noexcept; SWS_CORE_01731
none 函数

≙ [bitset]

bool none () const noexcept;
reset 函数 2

≙ [bitset]

重载 reset 2
Bitset< N > & reset () noexcept; SWS_CORE_01727
Result< Bitset< N > & > reset (std::size_t pos) noexcept; SWS_CORE_01728
set 函数 2

≙ [bitset]

重载 set 2
Bitset< N > & set () noexcept; SWS_CORE_01725
Result< Bitset< N > & > set (std::size_t pos, bool val=true) noexcept; SWS_CORE_01726
size 函数

≙ [bitset]

constexpr std::size_t size () const noexcept;
test 函数

except for the following deviations: 1. The function is noexcept 2. If pos does not correspond to a valid bit position, IsoStdOutOfRangeViolation is raised instead of std::out_of_range ≙ std::out_of_range

bool test (std::size_t pos) const noexcept;
to_string 函数

except for the following deviations: 1. Template arguments have been adapted to ara::core::BasicString in place of std:: basic_string ≙ [bitset]

template <class Allocator = std::allocator<char>> BasicString< Allocator > to_string (char zero=char(’0’), char one=char(’1’)) const;
to_uint16t 函数

[AUTOSAR defined] not present in ISO-14882. Converts the contents of the bitset to a std:: uint16_t from [SWS_APT_00025]

constexpr std::uint16_t to_uint16t () const noexcept;
to_uint32t 函数

[AUTOSAR defined] not present in ISO-14882. Alias for ara::core::Bitset::to_ulong but explicitly using the std::uint32_t type from [SWS_APT_00028] ≙ std::uint32_t

constexpr std::uint32_t to_uint32t () const noexcept;
to_uint64t 函数

[AUTOSAR defined] not present in ISO-14882. Alias for ara::core::Bitset::to_ullong but explicitly using the std::uint64_t type from [SWS_APT_00031] ≙ std::uint64_t

constexpr std::uint64_t to_uint64t () const noexcept;
to_uint8t 函数

[AUTOSAR defined] not present in ISO-14882. Converts the contents of the bitset to a std:: uint8_t from [SWS_APT_00022]

constexpr std::uint8_t to_uint8t () const noexcept;
to_ullong 函数

except for the following deviations: 1. Function is constexpr 2. The function is noexcept 3. If the integral value x corresponding to the bits in the bitset cannot be represented as the return type, IsoStdOverflowErrorViolation is raised instead of std:: overflow_error ≙ [bitset]

constexpr unsigned long long to_ullong () const noexcept;
to_ulong 函数

except for the following deviations: 1. Function is constexpr 2. The function is noexcept 3. If the integral value x corresponding to the bits in the bitset cannot be represented as the return type, IsoStdOverflowErrorViolation is raised instead of std:: overflow_error ≙ [bitset]

constexpr unsigned long to_ulong () const noexcept;

运算符

operator&= 函数

≙ [bitset]

Bitset< N > & operator&= (const Bitset< N > &rhs) noexcept;
operator<< 函数

≙ [bitset]

Bitset< N > operator<< (std::size_t pos) const noexcept;

≙ [bitset]

Bitset< N > & operator<<= (std::size_t pos) noexcept;
operator= 函数 2

[AUTOSAR defined] not present in ISO-14882. Copy assignment operator

重载 = 2
Bitset & operator= (const Bitset &) noexcept=default; SWS_CORE_01715
Bitset & operator= (Bitset &&) noexcept=default; SWS_CORE_01717
operator== 函数

≙ [bitset]

bool operator== (const Bitset< N > &rhs) const noexcept;
operator>> 函数

≙ [bitset]

Bitset< N > operator>> (std::size_t pos) const noexcept;

≙ [bitset]

Bitset< N > & operator>>= (std::size_t pos) noexcept;
operator[] 函数 2

except for the following deviations: 1. The function is noexcept ≙ [bitset]

重载 [] 2
constexpr bool operator[] (std::size_t pos) const noexcept; SWS_CORE_01732
reference operator[] (std::size_t pos) noexcept; SWS_CORE_01733
operator|= 函数

≙ [bitset]

Bitset< N > & operator|= (const Bitset< N > &rhs) noexcept;
operator~ 函数

≙ [bitset]

Bitset< N > operator~ () const noexcept;

≙ [bitset]

Bitset< N > & operatorˆ= (const Bitset< N > &rhs) noexcept;

嵌套类型

方法文档

函数 Bitset [SWS_CORE_01713]

constexpr Bitset () noexcept=default;

As per corresponding usage in [bitset]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01713
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01713@rel:R25-11#0cde28b9
Content hash
0cde28b9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01713
Status: valid/unmigrated Version: rel:R25-11#310efdcc 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_01713@rel:R25-11#310efdcc
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

函数 Bitset [SWS_CORE_01714] Upstream: RS_AP_00130

Bitset (const Bitset &) noexcept=default;

[AUTOSAR defined] not present in ISO-14882. Copy constructor

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01714
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01714@rel:R25-11#cb9edc3c
Content hash
cb9edc3c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01714
Status: valid/unmigrated Version: rel:R25-11#a6f79a8f 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_01714@rel:R25-11#a6f79a8f
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

函数 Bitset [SWS_CORE_01716] Upstream: RS_AP_00130

Bitset (Bitset &&) noexcept=default;

[AUTOSAR defined] not present in ISO-14882. Move constructor

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01716
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01716@rel:R25-11#130d9a2e
Content hash
130d9a2e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01716
Status: valid/unmigrated Version: rel:R25-11#9f8cafe2 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_01716@rel:R25-11#9f8cafe2
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

函数 Bitset [SWS_CORE_01719]

constexpr Bitset (unsigned long long val) noexcept;

As per corresponding usage in [bitset]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01719
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01719@rel:R25-11#7f3ea6c8
Content hash
7f3ea6c8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01719
Status: valid/unmigrated Version: rel:R25-11#b3cad51d 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_01719@rel:R25-11#b3cad51d
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

函数 Bitset [SWS_CORE_01749]

template <class CharT, class Traits, class Allocator> explicit Bitset (const BasicString< Allocator > &str, typename Basic String< Allocator >::size_type pos=0, typename BasicString< Allocator >::size_type n=BasicString< Allocator >::npos, CharT zero=CharT(’0’), CharT one=CharT(’1’)) noexcept;

As per corresponding usage in [bitset] except for the following deviations: 1. The function is noexcept 2. If (pos > size()), IsoStdOutOfRangeViolation is raised instead of std:: out_of_range 3. If any character is not 1 or 0, IsoStdInvalidArgumentViolation is raised instead of std::invalid_argument 4. Function arguments have been adapted to conform to ara::core::BasicString constructor parameters

Header-Datei#include "ara/core/bitset.h"
Scopeclass ara::core::Bitset
Exception-Sicherheitexception safe
Verletzungen (Violations)IsoStdOut- Description as per std::out_of_range. OfRangeViolation IsoStdInvalidArgu- Description as per std::invalid_argument mentViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_01749
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01749@rel:R25-11#f6f6c871
Content hash
f6f6c871
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01749
Status: valid/unmigrated Version: rel:R25-11#60c5b733 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_01749@rel:R25-11#60c5b733
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

函数 Bitset [SWS_CORE_01750]

template <class CharT> explicit Bitset (const CharT *str, typename BasicString< CharT >::size_type n=BasicString< CharT >::npos, CharT zero=CharT(’0’), Char T one=CharT(’1’));

As per corresponding usage in [bitset] except for the following deviations: 1. Function arguments have been adapted to conform to ara::core::BasicString constructor parameters

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01750
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01750@rel:R25-11#92b6ba0c
Content hash
92b6ba0c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01750
Status: valid/unmigrated Version: rel:R25-11#4ced3470 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_01750@rel:R25-11#4ced3470
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

函数 all [SWS_CORE_01744]

bool all () const noexcept;

As per corresponding usage in [bitset]

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

成员函数[SWS_CORE_01744]属于类ara::core::Bitset,并通过头文件#include "ara/core/bitset.h"提供。该函数具有签名bool all () const noexcept;,不接受任何参数并同步返回一个真值。根据规范,其语义借鉴了[bitset]中的相应用法;Interpretation:该方法预计检查实例的所有位是否均已置位(具有值true)。 问题 Q-a4f0f8970bd2c9bb (未决)

在错误处理方面,该函数被声明为noexcept并被指定为异常安全(exception safe)[SWS_CORE_01744]。由于不报告错误状态且执行保证无错误,因此来自ara::core::CoreErrc的错误码在此处不适用。

以下边界条件适用于调用上下文和并发性:

  • 该操作被声明为const,且不修改调用方ara::core::Bitset对象的状态[SWS_CORE_01744]。
  • 只要没有其他线程以写入方式修改相同的内存区域,通过多个线程的同时读访问预计在无同步的情况下是允许的。 问题 Q-d9f1f92a120128b5 (未决)

此内容由AI基于AUTOSAR规范R25-11生成。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01744
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01744@rel:R25-11#9486a04f
Content hash
9486a04f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01744
Status: valid/unmigrated Version: rel:R25-11#ae080485 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_01744@rel:R25-11#ae080485
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

函数 any [SWS_CORE_01745]

bool any () const noexcept;

As per corresponding usage in [bitset]

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

ara::core::Bitset的成员函数any()用于同步查询位集中管理的位的占用状态[SWS_CORE_01745]。根据规范,其行为遵循ISO C++类模板[bitset]的相应用法[SWS_CORE_01745]。Interpretation:如果至少有一个位已置位,则函数返回true;如果所有位均未置位,则返回false。 问题 Q-20c2aaf905d4a338 (未决)

关于使用、执行上下文和错误行为,适用以下规定:

  • 调用与参数:该方法在现有实例上无参数调用,例如预先通过构造函数初始化的实例[SWS_CORE_01749]。调用同步进行,并将检查结果直接作为bool返回[SWS_CORE_01745]。
  • 错误处理:该函数被声明为noexcept并被归类为异常安全(exception safe)[SWS_CORE_01745]。既不生成错误码也不生成DET/DEM报告;AUTOSAR标准中未规定操作失败的情况。
  • 并发性:通过const限定,该方法不修改实例[SWS_CORE_01745]。对同一实例的并行读访问可能是安全的,而并发写访问必须由调用方进行同步。 问题 Q-34893675aa85baf1 (未决)

在core的模块上下文中,any()为位集提供了一项基础检查功能,该功能与ara::core::Bitset的初始化和存储机制无缝配合[SWS_CORE_01745]、[SWS_CORE_01749]。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01745
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01745@rel:R25-11#a694d852
Content hash
a694d852
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01745
Status: valid/unmigrated Version: rel:R25-11#13aa29a1 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_01745@rel:R25-11#13aa29a1
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

函数 count [SWS_CORE_01740]

std::size_t count () const noexcept;

As per corresponding usage in [bitset]

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

用法与语义

成员函数count在ara::core::Bitset的实例上以同步且无参数的方式被调用([SWS_CORE_01740])。它在头文件#include "ara/core/bitset.h"中声明,并将计数结果作为std::size_t类型的返回值提供([SWS_CORE_01740])。业务行为遵循参考[bitset]([SWS_CORE_01740]);因此该值预计对应于已置位位的总数。 问题 Q-36c593b234f55695 (未决)

错误处理与并发

该函数被指定为noexcept并视为exception safe([SWS_CORE_01740])。既不引发异常也不返回错误码,并且未针对此元素规划向DET或DEM发送报告。由于count被声明为常量成员函数(const)([SWS_CORE_01740]),该调用不会修改对象的状态。因此,只要不发生并发写访问,对同一实例的并行读访问预计可以并发执行。 问题 Q-073bc3bbcb918763 (未决)

相互协作与区分

在命名空间ara::core中,该函数应与其他元素明确区分:

此文本根据AUTOSAR Release R25-11的规范数据自动生成。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01740
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01740@rel:R25-11#d324d789
Content hash
d324d789
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01740
Status: valid/unmigrated Version: rel:R25-11#3ade8441 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_01740@rel:R25-11#3ade8441
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

函数 flip [SWS_CORE_01730]

Bitset< N > & flip () noexcept;

As per corresponding usage in [bitset]

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

使用

类 ara::core::Bitset 的成员函数 flip() 根据 [bitset] 的行为同步翻转该实例所有位的状态 [SWS_CORE_01730]。该函数通过头文件 #include "ara/core/bitset.h" 提供,不接收任何参数,并返回对已修改对象(Bitset<N>&)的左值引用,从而允许链式操作 [SWS_CORE_01730]。

错误处理与异常安全性

该函数被声明为 noexcept 并被指定为异常安全(“exception safe”)[SWS_CORE_01730]。既不抛出 C++ 异常,也不返回错误码;因此推测执行始终无误。 问题 Q-df762b6329a2c0d4 (未决)

相互作用

模块 core 定义了用于位操作的相关变体:

  • 重载方法 flip(std::size_t pos) 用于定向翻转索引 pos 处的单个位 [SWS_CORE_01731]。与无参数形式不同,它返回一个 Result<Bitset<N>&>,并通过 IsoStdOutOfRangeViolation 指示无效位置 [SWS_CORE_01731]。
  • 通过引用类 ara::core::Bitset<N>::reference,成员函数 flip() 可用于翻转单个所引用的位并返回 reference& [SWS_CORE_01712]。

此使用说明由系统自动创建,并完全基于 AUTOSAR Adaptive R25-11 规范。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01730
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01730@rel:R25-11#c54cb387
Content hash
c54cb387
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01730
Status: valid/unmigrated Version: rel:R25-11#80129789 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_01730@rel:R25-11#80129789
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

函数 flip [SWS_CORE_01731]

Result< Bitset< N > & > flip (std::size_t pos) noexcept;

As per corresponding usage in [bitset] except for the following deviations: 1. The function is noexcept 2. If pos does not correspond to a valid bit position, IsoStdOutOfRangeViolation is raised instead of std::out_of_range

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

类 ara::core::Bitset 的成员函数 flip 同步翻转所传入位置 pos 处位的状态 [SWS_CORE_01731]。它在头文件 #include "ara/core/bitset.h" 中定义,并参考 std::bitset::flip 的行为,但具有特定的功能差异 [SWS_CORE_01731]。

该函数被声明为 noexcept 以及 exception safe,成功时在 Result<Bitset<N>&> 内返回对已修改 Bitset 的引用 [SWS_CORE_01731]。如果参数 pos 不对应于有效位位置,则不会抛出诸如 std::out_of_range 之类的 C++ 异常,而是触发违规 IsoStdOutOfRangeViolation [SWS_CORE_01731]。

关于并发性,推测由于缺少文档记录的同步机制,对同一 Bitset 实例的并发调用不具备线程安全性,必须进行外部协调。 问题 Q-de73bb65d6aab12c (未决)

在模块 core 中,该函数补充了其他相关操作:用于同步翻转实例所有位的无参数重载 flip() 可供使用 [SWS_CORE_01730],而针对位引用对象则提供了方法 ara::core::Bitset::reference::flip() [SWS_CORE_01712]。

此使用说明基于 AUTOSAR Adaptive Release R25-11 自动创建。

Header-Datei#include "ara/core/bitset.h"
Scopeclass ara::core::Bitset
Exception-Sicherheitexception safe
Verletzungen (Violations)IsoStdOut- Description as per std::out_of_range. OfRangeViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_01731
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01731@rel:R25-11#6603cda9
Content hash
6603cda9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01731
Status: valid/unmigrated Version: rel:R25-11#3ec8b647 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_01731@rel:R25-11#3ec8b647
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

函数 none [SWS_CORE_01746]

bool none () const noexcept;

As per corresponding usage in [bitset]

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

使用

类ara::core::Bitset的成员函数none用于查询位序列的占用状态[SWS_CORE_01746]。该方法需要包含头文件ara/core/bitset.h并具有签名bool none () const noexcept; [SWS_CORE_01746]。调用在现有实例上以同步且无参数的方式进行。规范关于其行为指引至[bitset]中的相应用法[SWS_CORE_01746];Interpretation:当且仅当位序列中没有任何一位被置位时(即所有位均为false),该方法预计返回true,否则返回false。 问题 Q-de8593251c7748d5 (未决)

错误处理与异常安全性

对于none,既未定义错误码也未定义单独的错误状态。根据规范,该函数被声明为noexcept并具有异常安全(exception safe)分类[SWS_CORE_01746]。因此,在发生错误时或执行期间不会出现C++异常。

并发性与限制

由于none被声明为const [SWS_CORE_01746],该方法调用不会修改对象的内部状态。因此,只要在同一实例上不发生并发写修改,对同一Bitset对象的并行读调用预计是并发非关键的且可重入的。 问题 Q-cf92e9abf57e9678 (未决)

此使用说明由AI助手自动生成,基于规范的要求。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01746
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01746@rel:R25-11#f4939915
Content hash
f4939915
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01746
Status: valid/unmigrated Version: rel:R25-11#8bba9b6e 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_01746@rel:R25-11#8bba9b6e
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&= [SWS_CORE_01720]

Bitset< N > & operator&= (const Bitset< N > &rhs) noexcept;

As per corresponding usage in [bitset]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01720
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01720@rel:R25-11#5baabc52
Content hash
5baabc52
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01720
Status: valid/unmigrated Version: rel:R25-11#fb4224f8 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_01720@rel:R25-11#fb4224f8
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<< [SWS_CORE_01747]

Bitset< N > operator<< (std::size_t pos) const noexcept;

As per corresponding usage in [bitset]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01747
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01747@rel:R25-11#ebf8d109
Content hash
ebf8d109
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01747
Status: valid/unmigrated Version: rel:R25-11#2d8f37de 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_01747@rel:R25-11#2d8f37de
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<<= [SWS_CORE_01723]

Bitset< N > & operator<<= (std::size_t pos) noexcept;

As per corresponding usage in [bitset]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01723
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01723@rel:R25-11#551d344a
Content hash
551d344a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01723
Status: valid/unmigrated Version: rel:R25-11#f4e1aed6 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_01723@rel:R25-11#f4e1aed6
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= [SWS_CORE_01715] Upstream: RS_AP_00130

Bitset & operator= (const Bitset &) noexcept=default;

[AUTOSAR defined] not present in ISO-14882. Copy assignment operator

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01715
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01715@rel:R25-11#6ee663ed
Content hash
6ee663ed
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01715
Status: valid/unmigrated Version: rel:R25-11#6cc96909 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_01715@rel:R25-11#6cc96909
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= [SWS_CORE_01717] Upstream: RS_AP_00130

Bitset & operator= (Bitset &&) noexcept=default;

[AUTOSAR defined] not present in ISO-14882. Move assignment operator

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01717
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01717@rel:R25-11#f684d67f
Content hash
f684d67f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01717
Status: valid/unmigrated Version: rel:R25-11#493efe21 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_01717@rel:R25-11#493efe21
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== [SWS_CORE_01742]

bool operator== (const Bitset< N > &rhs) const noexcept;

As per corresponding usage in [bitset]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01742
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01742@rel:R25-11#8d98c62d
Content hash
8d98c62d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01742
Status: valid/unmigrated Version: rel:R25-11#dccd8673 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_01742@rel:R25-11#dccd8673
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>> [SWS_CORE_01748]

Bitset< N > operator>> (std::size_t pos) const noexcept;

As per corresponding usage in [bitset]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01748
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01748@rel:R25-11#15fc324a
Content hash
15fc324a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01748
Status: valid/unmigrated Version: rel:R25-11#3aef5563 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_01748@rel:R25-11#3aef5563
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>>= [SWS_CORE_01724]

Bitset< N > & operator>>= (std::size_t pos) noexcept;

As per corresponding usage in [bitset]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01724
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01724@rel:R25-11#913dd0cf
Content hash
913dd0cf
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01724
Status: valid/unmigrated Version: rel:R25-11#7610a8ff 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_01724@rel:R25-11#7610a8ff
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[] [SWS_CORE_01732]

constexpr bool operator[] (std::size_t pos) const noexcept;

As per corresponding usage in [bitset] except for the following deviations: 1. The function is noexcept

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01732
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01732@rel:R25-11#fd43003d
Content hash
fd43003d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01732
Status: valid/unmigrated Version: rel:R25-11#2d0c689b 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_01732@rel:R25-11#2d0c689b
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[] [SWS_CORE_01733]

reference operator[] (std::size_t pos) noexcept;

As per corresponding usage in [bitset] except for the following deviations: 1. The function is noexcept

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01733
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01733@rel:R25-11#29fb78c3
Content hash
29fb78c3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01733
Status: valid/unmigrated Version: rel:R25-11#66b4364b 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_01733@rel:R25-11#66b4364b
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|= [SWS_CORE_01721]

Bitset< N > & operator|= (const Bitset< N > &rhs) noexcept;

As per corresponding usage in [bitset]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01721
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01721@rel:R25-11#d5bbb88c
Content hash
d5bbb88c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01721
Status: valid/unmigrated Version: rel:R25-11#cb81326d 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_01721@rel:R25-11#cb81326d
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~ [SWS_CORE_01729]

Bitset< N > operator~ () const noexcept;

As per corresponding usage in [bitset]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01729
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01729@rel:R25-11#7a6276bb
Content hash
7a6276bb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01729
Status: valid/unmigrated Version: rel:R25-11#070c2d27 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_01729@rel:R25-11#070c2d27
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ˆ= [SWS_CORE_01722]

Bitset< N > & operatorˆ= (const Bitset< N > &rhs) noexcept;

As per corresponding usage in [bitset]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01722
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01722@rel:R25-11#a5451352
Content hash
a5451352
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01722
Status: valid/unmigrated Version: rel:R25-11#06db033f 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_01722@rel:R25-11#06db033f
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

函数 reset [SWS_CORE_01727]

Bitset< N > & reset () noexcept;

As per corresponding usage in [bitset]

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

成员函数 reset() 根据规范 [SWS_CORE_01727] 重置 ara::core::Bitset 实例的状态。该函数通过头文件 #include "ara/core/bitset.h" 提供,并具有签名 Bitset<N>& reset() noexcept;。

用法与语义

该函数不接收参数,并在调用对象上同步工作。通过对 [bitset] 中常规用法的指定引用,该调用应该将所有包含的位重置为 false(或 0),并返回对其自身位集实例的引用(*this),从而支持方法链式调用。 问题 Q-89116316a65e0772 (未决)

错误处理与异常安全性

根据 [SWS_CORE_01727],该函数被声明为 noexcept,并具有“exception safe”分类。由于与参数化重载相比不需要进行索引检查,因此无参数变体中不会出现错误状态或错误代码。

相互协作与区分

  • 在同一作用域 ara::core::Bitset 中,存在符合 [SWS_CORE_01728] 的重载 reset(std::size_t pos)。它专门重置单个位,但返回 Result<Bitset<N>&>,并在 pos 无效时报告 IsoStdOutOfRangeViolation。
  • 在模块 core 中,对于来自 #include "ara/core/optional.h" 且符合 [SWS_CORE_01136] 的 ara::core::Optional 以及符合 [SWS_CORE_01165] 的 ara::core::Optional<T&>,也存在同名函数,它们丢弃所包含的值并具有返回类型 void。

本文档由人工智能生成,用作参考指南。仅 AUTOSAR 标准的规范具有约束力。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01727
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01727@rel:R25-11#d13ff467
Content hash
d13ff467
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01727
Status: valid/unmigrated Version: rel:R25-11#96296e79 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_01727@rel:R25-11#96296e79
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

函数 reset [SWS_CORE_01728]

Result< Bitset< N > & > reset (std::size_t pos) noexcept;

As per corresponding usage in [bitset] except for the following deviations: 1. The function is noexcept 2. If pos does not correspond to a valid bit position, IsoStdOutOfRangeViolation is raised instead of std::out_of_range

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

类 ara::core::Bitset 的成员函数 reset 同步将指定位置 pos 处的单个位重置为值 0 [SWS_CORE_01728]。该函数遵循 std::bitset 的行为,但存在两项主要差异:它被声明为 noexcept,并在 Result<Bitset<N>&> 中返回结果,以便在不使用 C++ 异常的情况下映射错误情况 [SWS_CORE_01728]。

错误处理

如果传入的索引 pos 不对应于位集内的有效位位置,则将触发违规 IsoStdOutOfRangeViolation 而非 std::out_of_range [SWS_CORE_01728]。在发生错误时,该违规作为错误状态在返回的 Result 对象中提供,从而使该操作即使在参数值无效的情况下也能保持异常安全 [SWS_CORE_01728]。

相互协作与区分

在模块 core 中,针对 ara::core::Bitset 补充存在无参数重载 reset(),该重载一次性清除容器的所有位并直接返回对对象的引用 [SWS_CORE_01727]。此外,相关需求 [SWS_CORE_01136] 和 [SWS_CORE_01165] 为 ara::core::Optional 定义了同名方法,该方法在其中丢弃所包含的值。

并发性

由于 reset 更改位集的内部状态,在没有外部同步的情况下,对同一实例的并发调用推测不是线程安全的(解释:沿用常规 C++ 容器语义)。 问题 Q-e2e1c041eadedf0f (未决)

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

Header-Datei#include "ara/core/bitset.h"
Scopeclass ara::core::Bitset
Exception-Sicherheitexception safe
Verletzungen (Violations)IsoStdOut- Description as per std::out_of_range. OfRangeViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_01728
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01728@rel:R25-11#6421b61b
Content hash
6421b61b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01728
Status: valid/unmigrated Version: rel:R25-11#69fbce4c 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_01728@rel:R25-11#69fbce4c
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

函数 set [SWS_CORE_01725]

Bitset< N > & set () noexcept;

As per corresponding usage in [bitset]

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

类 ara::core::Bitset 的同步成员函数 set() 将对象包含的所有位设置为值 true([SWS_CORE_01725])。它在行为上对应于 ISO C++ 标准中 std::bitset 的工作机制,并通过头文件 ara/core/bitset.h 提供([SWS_CORE_01725])。该方法调用无参数,并返回对已修改 bitset(Bitset<N>&)的左值引用([SWS_CORE_01725]),从而允许在同一实例上直接链式调用后续操作。

该操作被声明为 noexcept,并具备 exception safe 特性([SWS_CORE_01725])。由于它遍历所有位或设置整体状态,因此与基于位置的访问不同,不会发生范围错误。规范未对线程安全性作出说明;Interpretation:由于对象状态被直接修改,在没有外部保护的情况下,对同一 Bitset 实例的并发访问大概不是并发安全或线程安全的。 问题 Q-f8c1b5721f668193 (未决)

在模块 core 内部的协作中,该函数补充了重载变体 set(std::size_t, bool)([SWS_CORE_01726])。无参数版本保证成功设置整个字段,而带参数版本则针对性地修改单个位,返回类型 Result<Bitset<N>&>,并在传入无效位置索引时通过 IsoStdOutOfRangeViolation 进行指示([SWS_CORE_01726])。

本使用说明基于针对 Release R25-11 的 AUTOSAR Adaptive 规范自动创建。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01725
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01725@rel:R25-11#20ae7256
Content hash
20ae7256
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01725
Status: valid/unmigrated Version: rel:R25-11#80248ab7 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_01725@rel:R25-11#80248ab7
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

函数 set [SWS_CORE_01726]

Result< Bitset< N > & > set (std::size_t pos, bool val=true) noexcept;

As per corresponding usage in [bitset] except for the following deviations: 1. The function is noexcept 2. If pos does not correspond to a valid bit position, IsoStdOutOfRangeViolation is raised instead of std::out_of_range

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

根据 [SWS_CORE_01726],类 ara::core::Bitset 的成员函数 set 将指定位置 pos 处的位修改为值 val。该函数在头文件 #include "ara/core/bitset.h" 中声明,并以同步且异常安全的方式工作。

与 std::bitset 的标准行为相比,该函数存在两项主要偏差([SWS_CORE_01726]):

  • 该函数声明为 noexcept,不抛出 C++ 异常。
  • 如果 pos 不对应有效位位置,则触发 IsoStdOutOfRangeViolation 而非 std::out_of_range。

返回值为 Result<Bitset<N>&>([SWS_CORE_01726])。成功时,Result 包含对已修改 bitset 对象的引用。若 pos 超出有效范围,则 Result 传递相应的错误违规(Violation)。

与将所有位置位并直接返回 Bitset<N>& 的无参数变体 set()([SWS_CORE_01725])不同,此基于位置的重载需要对 Result 对象进行求值以处理范围错误([SWS_CORE_01726])。

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

Header-Datei#include "ara/core/bitset.h"
Scopeclass ara::core::Bitset
Exception-Sicherheitexception safe
Verletzungen (Violations)IsoStdOut- Description as per std::out_of_range. OfRangeViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_01726
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01726@rel:R25-11#04f14413
Content hash
04f14413
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01726
Status: valid/unmigrated Version: rel:R25-11#7bc780ef 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_01726@rel:R25-11#7bc780ef
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

函数 size [SWS_CORE_01741]

constexpr std::size_t size () const noexcept;

As per corresponding usage in [bitset]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01741
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01741@rel:R25-11#fd636dc2
Content hash
fd636dc2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01741
Status: valid/unmigrated Version: rel:R25-11#ae3039b5 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_01741@rel:R25-11#ae3039b5
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

函数 test [SWS_CORE_01743]

bool test (std::size_t pos) const noexcept;

As per corresponding usage in [bitset] except for the following deviations: 1. The function is noexcept 2. If pos does not correspond to a valid bit position, IsoStdOutOfRangeViolation is raised instead of std::out_of_range

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

使用

类ara::core::Bitset的同步成员函数test根据[SWS_CORE_01743]检查所传入位置pos处的位状态。所需的位位置pos(类型为std::size_t)作为调用参数传入。该函数同步返回一个bool类型的值,其中true表示该位已置位,false表示其未置位。若要在Adaptive平台的Core模块中集成和使用该函数,必须包含头文件ara/core/bitset.h [SWS_CORE_01743]。

错误处理与偏差

功能行为原则上遵循std::bitset的语义,但存在两处关键的系统专用偏差[SWS_CORE_01743]:

  • 签名被声明为noexcept并保证完全异常安全(exception safe)[SWS_CORE_01743]。
  • 如果位位置pos不对应于对象内的有效位位置,则引发违例IsoStdOutOfRangeViolation而不是类型为std::out_of_range的异常[SWS_CORE_01743]。其描述参考了std::out_of_range的描述[SWS_CORE_01743]。

并发性与限制

由于该函数被指定为const,因此它不会修改实例。因此,在常规运行中,对同一位集实例的多次并发读访问预计可以在无数据冲突的情况下执行(Interpretation)。 问题 Q-585dbdfefac63391 (未决)如果同时在同一实例上发生写修改,则可能需要调用方进行外部同步。

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

Header-Datei#include "ara/core/bitset.h"
Scopeclass ara::core::Bitset
Exception-Sicherheitexception safe
Verletzungen (Violations)IsoStdOut- Description as per std::out_of_range. OfRangeViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_01743
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01743@rel:R25-11#c8f9e0f3
Content hash
c8f9e0f3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01743
Status: valid/unmigrated Version: rel:R25-11#7808abe9 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_01743@rel:R25-11#7808abe9
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

函数 to_string [SWS_CORE_01751]

template <class Allocator = std::allocator<char>> BasicString< Allocator > to_string (char zero=char(’0’), char one=char(’1’)) const;

As per corresponding usage in [bitset] except for the following deviations: 1. Template arguments have been adapted to ara::core::BasicString in place of std:: basic_string

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

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

Record
AUTOSAR/AP/record/SWS_CORE_01751
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01751@rel:R25-11#718caf4c
Content hash
718caf4c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01751
Status: valid/unmigrated Version: rel:R25-11#9191cb39 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_01751@rel:R25-11#9191cb39
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

函数 to_uint16t [SWS_CORE_01737] Upstream: RS_AP_00130

constexpr std::uint16_t to_uint16t () const noexcept;

[AUTOSAR defined] not present in ISO-14882. Converts the contents of the bitset to a std:: uint16_t from [SWS_APT_00025]

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

类 ara::core::Bitset 的成员函数 to_uint16t 将 bitset 的内容转换为类型为 std::uint16_t 的整数值([SWS_CORE_01737]、[SWS_APT_00025])。它代表一项 AUTOSAR 特定的扩展,未包含在 ISO C++ 标准 ISO-14882 中([SWS_CORE_01737])。同步调用通过头文件 ara/core/bitset.h 提供([SWS_CORE_01737])。

在生成的返回值中,bitset 的第一个位对应于数值的最低有效位(least significant bit),最后一个位对应于最高有效位(most significant bit)([SWS_CORE_01737])。由于该方法被指定为 constexpr,它也可以在编译时针对常量实例进行求值([SWS_CORE_01737])。

该操作被指定为thread-safe以及exception safe([SWS_CORE_01737])。如果位值无法在std::uint16_t的值域中表示,则存在IsoStdOverflowErrorViolation([SWS_CORE_01737])。Interpretation:由于noexcept声明,该违规行为预计不会通过常规C++异常报告,而是通过平台专用的违例机制进行处理。 问题 Q-785057e36fb7e434 (未决)

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

Header-Datei#include "ara/core/bitset.h"
Scopeclass ara::core::Bitset
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)IsoStdOverflowEr- If the integral value x corresponding to the bits in the bitset cannot rorViolation be represented as the return type

Rückgabewert

TypBeschreibung
std::uint16_tThe bits in the bitset, whereby the first bit of the bitset corresponds to the least significant bit of the returned number and the last bit corresponds to the most significant bit

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

Record
AUTOSAR/AP/record/SWS_CORE_01737
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01737@rel:R25-11#ea5dc5ba
Content hash
ea5dc5ba
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01737
Status: valid/unmigrated Version: rel:R25-11#0c41ce4c 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_01737@rel:R25-11#0c41ce4c
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

函数 to_uint32t [SWS_CORE_01738] Upstream: RS_AP_00130

constexpr std::uint32_t to_uint32t () const noexcept;

[AUTOSAR defined] not present in ISO-14882. Alias for ara::core::Bitset::to_ulong but explicitly using the std::uint32_t type from [SWS_APT_00028]

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

用法与语义

方法 to_uint32t 是类 ara::core::Bitset 的无参数同步成员函数,通过头文件 ara/core/bitset.h 提供 [SWS_CORE_01738]。它将 bitset 实例中的各位转换为 std::uint32_t 类型的 32 位无符号整数值 [SWS_CORE_01738]。该函数未包含在 ISO-14882 中,而是被定义为 ara::core::Bitset::to_ulong 的 AUTOSAR 特定别名,其显式使用来自 [SWS_APT_00028] 的数据类型 std::uint32_t [SWS_CORE_01738]。在映射位序列时,bitset 的第一位对应返回值的最低有效位(least significant bit),最后一位对应最高有效位(most significant bit)[SWS_CORE_01738]。

错误处理与边界条件

对于错误情况,规范定义了违规 IsoStdOverflowErrorViolation;当与所置位对应的整数值无法在返回类型的值域中表示时,便会发生该违规 [SWS_CORE_01738]。

并发性与执行上下文

该函数声明带有 constexpr 和 noexcept [SWS_CORE_01738]。在执行安全性方面,它被规范为线程安全(thread-safe)以及异常安全(exception safe)[SWS_CORE_01738]。

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

Header-Datei#include "ara/core/bitset.h"
Scopeclass ara::core::Bitset
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)IsoStdOverflowEr- If the integral value x corresponding to the bits in the bitset cannot rorViolation be represented as the return type

Rückgabewert

TypBeschreibung
std::uint32_tThe bits in the bitset, whereby the first bit of the bitset corresponds to the least significant bit of the returned number and the last bit corresponds to the most significant bit

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

Record
AUTOSAR/AP/record/SWS_CORE_01738
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01738@rel:R25-11#66388fc6
Content hash
66388fc6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01738
Status: valid/unmigrated Version: rel:R25-11#61be4d07 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_01738@rel:R25-11#61be4d07
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

函数 to_uint64t [SWS_CORE_01739] Upstream: RS_AP_00130

constexpr std::uint64_t to_uint64t () const noexcept;

[AUTOSAR defined] not present in ISO-14882. Alias for ara::core::Bitset::to_ullong but explicitly using the std::uint64_t type from [SWS_APT_00031]

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

使用

类 ara::core::Bitset 的成员函数 to_uint64t 将 bitset 中包含的各位同步转换为 std::uint64_t 类型的整数值([SWS_CORE_01739])。该操作为 AUTOSAR 特定扩展,并未在 ISO-14882 中定义([SWS_CORE_01739])。它充当方法 ara::core::Bitset::to_ullong 的别名,但强制且显式地使用符合 [SWS_APT_00031] 的类型 std::uint64_t([SWS_CORE_01739])。该声明通过头文件 #include "ara/core/bitset.h" 提供([SWS_CORE_01739])。

对于返回值按位映射,规则为 bitset 的第一位对应生成值的最低有效位(least significant bit),最后一位分配给最高有效位(most significant bit)([SWS_CORE_01739])。得益于 constexpr 限定,求值既可以在运行时进行,也可以在编译时用于常量表达式([SWS_CORE_01739])。

错误处理与并发

在执行安全性方面,该函数声明带有 noexcept,被归类为异常安全(exception safe),且可以无限制地以线程安全(thread-safe)方式调用([SWS_CORE_01739])。如果与各位对应的整数值无法在目标类型中表示,则属于错误情况 IsoStdOverflowErrorViolation([SWS_CORE_01739])。该接口满足上层需求 [RS_AP_00130]。

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

Header-Datei#include "ara/core/bitset.h"
Scopeclass ara::core::Bitset
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)IsoStdOverflowEr- If the integral value x corresponding to the bits in the bitset cannot rorViolation be represented as the return type

Rückgabewert

TypBeschreibung
std::uint64_tThe bits in the bitset, whereby the first bit of the bitset corresponds to the least significant bit of the returned number and the last bit corresponds to the most significant bit

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

Record
AUTOSAR/AP/record/SWS_CORE_01739
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01739@rel:R25-11#d1a49785
Content hash
d1a49785
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01739
Status: valid/unmigrated Version: rel:R25-11#162ea888 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_01739@rel:R25-11#162ea888
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

函数 to_uint8t [SWS_CORE_01736] Upstream: RS_AP_00130

constexpr std::uint8_t to_uint8t () const noexcept;

[AUTOSAR defined] not present in ISO-14882. Converts the contents of the bitset to a std:: uint8_t from [SWS_APT_00022]

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

使用

根据 [SWS_CORE_01736] 和 [SWS_APT_00022],类 ara::core::Bitset 的成员函数 to_uint8t 将存储的 bitset 内容同步转换为类型为 std::uint8_t 的 8 位无符号整数值。这是一项 AUTOSAR 特定的功能扩展,在 ISO-14882 标准中不存在 [SWS_CORE_01736]。该函数通过头文件 ara/core/bitset.h 提供,无参数,并声明为 constexpr 和 noexcept [SWS_CORE_01736]。位序列的第一个位对应于返回值中的最低有效位(LSB),最后一个位对应于最高有效位(MSB)[SWS_CORE_01736]。

错误处理

如果 bitset 中位对应的整数值无法在目标类型 std::uint8_t 中表示,则存在违规 IsoStdOverflowErrorViolation [SWS_CORE_01736]。尽管有 noexcept 声明,该函数在异常安全性方面被指定为 exception safe [SWS_CORE_01736]。

并发性与交互

作为常量成员函数,to_uint8t 被显式声明为 thread-safe [SWS_CORE_01736],因此多个线程对同一实例的并发读取访问是安全的。目标类型的表示遵循 [SWS_APT_00022] 中的规定。

本使用说明系基于 AUTOSAR Adaptive Release R25-11 规范自动创建。

Header-Datei#include "ara/core/bitset.h"
Scopeclass ara::core::Bitset
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)IsoStdOverflowEr- If the integral value x corresponding to the bits in the bitset cannot rorViolation be represented as the return type

Rückgabewert

TypBeschreibung
std::uint8_tThe bits in the bitset, whereby the first bit of the bitset corresponds to the least significant bit of the returned number and the last bit corresponds to the most significant bit

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

Record
AUTOSAR/AP/record/SWS_CORE_01736
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01736@rel:R25-11#4102a3cf
Content hash
4102a3cf
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01736
Status: valid/unmigrated Version: rel:R25-11#c8fcd783 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_01736@rel:R25-11#c8fcd783
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

函数 to_ullong [SWS_CORE_01735]

constexpr unsigned long long to_ullong () const noexcept;

As per corresponding usage in [bitset] except for the following deviations: 1. Function is constexpr 2. The function is noexcept 3. If the integral value x corresponding to the bits in the bitset cannot be represented as the return type, IsoStdOverflowErrorViolation is raised instead of std:: overflow_error

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

类 ara::core::Bitset 的成员函数 to_ullong 将存储的位序列同步转换为类型为 unsigned long long 的整数值 [SWS_CORE_01735]。它在头文件 #include "ara/core/bitset.h" 中定义,并与 ISO 标准 std::bitset 相对地声明为 constexpr 以及 noexcept [SWS_CORE_01735]。

关于错误处理和异常行为,适用以下规定:

  • 溢出处理:如果由所设置位表示的整数值无法在返回类型中表示,则不会抛出 std::overflow_error 异常,而是触发违规 IsoStdOverflowErrorViolation [SWS_CORE_01735]。
  • 异常安全性:该函数被归类为 exception safe,并且由于 noexcept 规范,不抛出 C++ 异常 [SWS_CORE_01735]。

在与其他接口的交互中,AUTOSAR Adaptive 通过 to_uint64t 提供了一种类型化的替代方案,该方案充当 to_ullong 的直接别名,但显式返回定宽类型 std::uint64_t [SWS_CORE_01739]。在这两个函数中,bitset 的第一个位对应于最低有效位(LSB),最后一个位对应于所得数值的最高有效位(MSB)[SWS_CORE_01739]。由于 to_ullong 是常量成员函数,且其功能等价项被指定为 thread-safe,因此同一实例上的并发读取调用大概也是线程安全的 [SWS_CORE_01739]。 问题 Q-075766fabc193ce8 (未决)

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

Header-Datei#include "ara/core/bitset.h"
Scopeclass ara::core::Bitset
Exception-Sicherheitexception safe
Verletzungen (Violations)IsoStdOverflowEr- Description as per std::overflow_error rorViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_01735
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01735@rel:R25-11#d8ce63fb
Content hash
d8ce63fb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01735
Status: valid/unmigrated Version: rel:R25-11#56e54640 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_01735@rel:R25-11#56e54640
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

函数 to_ulong [SWS_CORE_01734]

constexpr unsigned long to_ulong () const noexcept;

As per corresponding usage in [bitset] except for the following deviations: 1. Function is constexpr 2. The function is noexcept 3. If the integral value x corresponding to the bits in the bitset cannot be represented as the return type, IsoStdOverflowErrorViolation is raised instead of std:: overflow_error

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

成员函数 ara::core::Bitset::to_ulong 将 bitset 实例中设置的位同步转换为类型为 unsigned long 的整数值 [SWS_CORE_01734]。该函数需要头文件 ara/core/bitset.h 并属于类 ara::core::Bitset 的作用域 [SWS_CORE_01734]。通过具有签名 constexpr unsigned long to_ulong() const noexcept; 的声明,求值既可以在运行时进行,也可以在编译时在常量表达式中进行 [SWS_CORE_01734]。

在错误行为方面,该函数与 ISO 标准 std::bitset 存在重大差异:如果对应于这些位的整数值无法在返回类型 unsigned long 中表示,则不会抛出类型为 std::overflow_error 的异常,而是触发 IsoStdOverflowErrorViolation [SWS_CORE_01734]。尽管存在此违规条件,该函数仍被声明为 noexcept,并在形式上被视为异常安全(exception safe)[SWS_CORE_01734]。

在与其他转换函数的交互中,AUTOSAR Adaptive 通过 to_uint32t 提供了一个直接对应项,该项充当 to_ulong 的别名,但类型精确地返回 std::uint32_t [SWS_CORE_01738]。关于并发性,在对同一 bitset 进行并发读取访问时,该方法应当是线程安全的(推测),因为它被定义为 const,并且对应的需求 to_uint32t 明确标记为 thread-safe [SWS_CORE_01738]。 问题 Q-59f95b86801a697d (未决)

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

Header-Datei#include "ara/core/bitset.h"
Scopeclass ara::core::Bitset
Exception-Sicherheitexception safe
Verletzungen (Violations)IsoStdOverflowEr- Description as per std::overflow_error rorViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_01734
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01734@rel:R25-11#6a7e4cce
Content hash
6a7e4cce
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01734
Status: valid/unmigrated Version: rel:R25-11#1b6a5b2d 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_01734@rel:R25-11#1b6a5b2d
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

函数 ~Bitset [SWS_CORE_01718] Upstream: RS_AP_00130

~Bitset () noexcept;

[AUTOSAR defined] not present in ISO-14882. Destructor

Header-Datei#include "ara/core/bitset.h"
Scopeclass ara::core::Bitset
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_01718
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_01718@rel:R25-11#f3404ca4
Content hash
f3404ca4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_01718
Status: valid/unmigrated Version: rel:R25-11#169f86ea 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_01718@rel:R25-11#169f86ea
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