Provides a standard-compliant, type-safe, fixed-size bitfield abstraction with noexcept guarantees for Adaptive Core.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: ae7240ca6617ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Provides a standard-compliant, type-safe, fixed-size bitfield abstraction with noexcept guarantees for Adaptive Core.
The class template ara::core::Bitset provides an implementation of std::bitset for fixed-size bit sequences adapted for AUTOSAR Adaptive [SWS_CORE_01741]. It offers comprehensive operations for bit manipulation, logical operations, and optimized conversions to scalar integer types with strict noexcept guarantees [SWS_CORE_01738]. Position-based modifications report invalid indices via ara::core::Result instead of C++ exceptions, while conversions handle overflow errors deterministically. This makes the class particularly suitable for resource-efficient and fail-safe ECU functions.
Context
The template class ara::core::Bitset provides an implementation of the C++ standard type std::bitset for bit sequences with a length N fixed at compile time within the Adaptive Platform [SWS_CORE_01741]. In the AUTOSAR ecosystem, the class serves for the performant and type-safe handling of bitfields, status masks, and flag registers on ECUs. It integrates seamlessly into the type system of the core module by supporting the platform-specific type ara::core::BasicString instead of std::basic_string[SWS_CORE_01749], [SWS_CORE_01751]. In addition, AUTOSAR extends the standardized interface with dedicated conversion functions to unsigned fixed-width integer types such as std::uint8_t, std::uint16_t, std::uint32_t, and std::uint64_t[SWS_CORE_01736], [SWS_CORE_01737], [SWS_CORE_01738], [SWS_CORE_01739].
Lifecycle
An instance is created flexibly via multiple constructors. The default constructor initializes all N bits as zero values and is declared as constexpr and noexcept[SWS_CORE_01713]. Alternatively, a bitset can be instantiated from a scalar value of type unsigned long long[SWS_CORE_01719] or text-based from ara::core::BasicString[SWS_CORE_01749] or a null-terminated string pointer const CharT*[SWS_CORE_01750]. Copy and move constructors are provided and defined as noexcept=default[SWS_CORE_01714], [SWS_CORE_01716]. Likewise, the corresponding assignment operators are provided [SWS_CORE_01715], [SWS_CORE_01717]. The destructor is specified as noexcept and thread-safe [SWS_CORE_01718]. With regard to concurrency, the integer conversion functions are also thread-safe [SWS_CORE_01736], [SWS_CORE_01737], whereas modifying accesses to the same bitset instance must be synchronized.
Usage Path
A typical usage path comprises instantiation, subsequent manipulation of individual bits or bitmasks, and final evaluation or conversion of the bitfield:
Creation: The bitset is typically created with an initial value [SWS_CORE_01719] or initialized via the default constructor [SWS_CORE_01713].
Conversion: For further processing, the bitfield content can be converted into numerical fixed-width types, for example via to_uint32t[SWS_CORE_01738], or exported as a string using to_string[SWS_CORE_01751].
In contrast to std::bitset, ara::core::Bitset uses a fault-tolerant, deterministic error handling concept without exceptions (noexcept):
Out of bounds on positional accesses: The mutating functions set(pos)[SWS_CORE_01726], reset(pos)[SWS_CORE_01728], and flip(pos)[SWS_CORE_01731] use the return type Result<Bitset<N>&>. If pos is outside the valid range, IsoStdOutOfRangeViolation is reported instead of std::out_of_range. Interpretation: The consistent use of ara::core::Result and noexcept is likely intended to comply with the strict no-exception requirements in safety-critical areas of the Adaptive Platform. Question Q-322c53fff705bce6 (open) The inspection function test(pos) also indicates IsoStdOutOfRangeViolation if pos is invalid [SWS_CORE_01743].
Invalid strings: During construction from ara::core::BasicString[SWS_CORE_01749], a IsoStdOutOfRangeViolation is triggered on pos > size(), and a IsoStdInvalidArgumentViolation (instead of std::invalid_argument) is triggered on characters other than 0 or 1.
Restricted exception safety: While most operations are noexcept and exception-safe, construction from pointers const CharT*[SWS_CORE_01750] as well as export via to_string[SWS_CORE_01751] are explicitly classified as not exception safe (not exception safe).
This class guide is based on the AUTOSAR Adaptive Release R25-11 specification and was generated automatically.
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
[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
[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
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;
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;
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
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
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 68eb943f5f65ProvenanceOpen questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The member function [SWS_CORE_01744] belongs to class ara::core::Bitset and is provided via header file #include "ara/core/bitset.h". The function has signature bool all () const noexcept;, takes no parameters, and synchronously returns a boolean value. According to the specification, the semantics are based on the corresponding usage in [bitset]; interpretation: the method presumably checks whether all bits of the instance are set (have the value true). Question Q-a4f0f8970bd2c9bb (open)
Regarding error handling, the function is declared as noexcept and specified as exception safe (exception safe) [SWS_CORE_01744]. Since no error states are reported and execution is guaranteed to be error-free, error codes from ara::core::CoreErrc do not apply here.
The following constraints apply to the call context and concurrency:
The operation is declared as const and does not modify the state of the calling ara::core::Bitset object [SWS_CORE_01744].
Concurrent read accesses across multiple threads are expected to be permissible without synchronization as long as no other thread modifies the same memory area via writes. Question Q-d9f1f92a120128b5 (open)
This content was generated by an AI based on the AUTOSAR specification R25-11.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 7dc0cee01033ProvenanceOpen questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The member function any() of ara::core::Bitset serves to synchronously query the occupancy state of the bits managed in the bitset [SWS_CORE_01745]. According to the specification, the behavior is based on the corresponding usage of the ISO C++ class template [bitset][SWS_CORE_01745]. Interpretation: The function returns true if at least one bit is set, and false if all bits are unset. Question Q-20c2aaf905d4a338 (open)
Regarding usage, execution context, and error behavior, the following specifications apply:
Call and parameters: The method is called without parameters on an existing instance that was, for example, previously initialized via the constructor [SWS_CORE_01749]. The call is synchronous and returns the check result directly as bool[SWS_CORE_01745].
Error handling: The function is declared as noexcept and classified as exception safe (exception safe) [SWS_CORE_01745]. Neither error codes nor DET/DEM messages are generated; failure of the operation is not anticipated in the AUTOSAR standard.
Concurrency: Due to the const qualification, the method does not modify the instance [SWS_CORE_01745]. Concurrent read accesses to the same instance are presumably safe, whereas competing write accesses must be synchronized by the caller. Question Q-34893675aa85baf1 (open)
In the module context of core, any() provides a fundamental inspection function for bitsets that interacts seamlessly with the initialization and storage mechanisms of ara::core::Bitset[SWS_CORE_01745], [SWS_CORE_01749].
This usage note was generated automatically based on the specification of AUTOSAR Adaptive R25-11.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 4dcb196eeab8ProvenanceOpen questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Usage and Semantics
The member function count is called synchronously and parameterlessly on an instance of ara::core::Bitset ([SWS_CORE_01740]). It is declared in header #include "ara/core/bitset.h" and returns the count result as a return value of type std::size_t ([SWS_CORE_01740]). The technical behavior is based on reference [bitset] ([SWS_CORE_01740]); the value is therefore expected to correspond to the total number of set bits. Question Q-36c593b234f55695 (open)
Error Handling and Concurrency
The function is specified as noexcept and is considered exception safe ([SWS_CORE_01740]). Neither exceptions are thrown nor error codes returned, and notifications to DET or DEM are not provided for this element. Since count is declared as a const member function (const) ([SWS_CORE_01740]), the call does not modify the state of the object. Concurrent read accesses to the same instance are therefore expected to be executable concurrently, provided that no conflicting write accesses take place. Question Q-073bc3bbcb918763 (open)
Interaction and Distinction
In namespace ara::core, the function must be clearly distinguished from other elements:
In ara::core::Map, count is used to determine existing keys ([SWS_CORE_01494], [SWS_CORE_01495]), but is classified as not exception safe.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 3295cd6e5b84ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
use
The member function flip() of class ara::core::Bitset synchronously inverts the state of all bits of the instance according to the behavior of [bitset][SWS_CORE_01730]. The function is provided via header #include "ara/core/bitset.h", takes no parameters, and returns an lvalue reference to the modified object (Bitset<N>&), which enables chaining of operations [SWS_CORE_01730].
Error Handling and Exception Safety
The function is declared as noexcept and specified as exception safe (“exception safe”) [SWS_CORE_01730]. Neither C++ exceptions are thrown nor error codes returned; execution is therefore likely to always proceed error-free. Question Q-df762b6329a2c0d4 (open)
Interaction
Module core defines related variants for bit manipulation:
The overloaded method flip(std::size_t pos) serves to specifically invert a single bit at index pos[SWS_CORE_01731]. In contrast to the parameterless form, it returns a Result<Bitset<N>&> and signals invalid positions via IsoStdOutOfRangeViolation[SWS_CORE_01731].
Via the reference class ara::core::Bitset<N>::reference, the member function flip() is available to invert a single referenced bit and return a reference&[SWS_CORE_01712].
This usage note was created automatically and relies exclusively on the specification of AUTOSAR Adaptive R25-11.
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-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: cc8134eb8cb3ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The member function flip of class ara::core::Bitset synchronously inverts the state of the bit at the passed position pos[SWS_CORE_01731]. It is defined in header #include "ara/core/bitset.h" and follows the behavior of std::bitset::flip, but exhibits specific functional deviations [SWS_CORE_01731].
The function is declared as noexcept as well as exception safe and, on success, returns a reference to the modified bitset inside a Result<Bitset<N>&>[SWS_CORE_01731]. If the parameter pos does not correspond to a valid bit position, the violation IsoStdOutOfRangeViolation is triggered instead of a C++ exception such as std::out_of_range[SWS_CORE_01731].
Regarding concurrency, concurrent calls on the same bitset instance are likely not thread-safe due to the lack of documented synchronization and must be coordinated externally. Question Q-de73bb65d6aab12c (open)
In module core, the function complements other related operations: For synchronously inverting all bits of an instance, the parameterless overload flip() is provided [SWS_CORE_01730], while for bit reference objects the method ara::core::Bitset::reference::flip() is available [SWS_CORE_01712].
This usage note was created automatically based on the AUTOSAR Adaptive release R25-11.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 08d4a9889ec9ProvenanceOpen questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
use
The member function none of class ara::core::Bitset serves to query the occupancy state of the bit sequence [SWS_CORE_01746]. The method requires including header ara/core/bitset.h and has signature bool none () const noexcept;[SWS_CORE_01746]. The call takes place synchronously and parameterlessly on an existing instance. With regard to behavior, the specification refers to the corresponding usage in [bitset][SWS_CORE_01746]; interpretation: the method is expected to return true if and only if not a single bit within the bit sequence is set (i.e., all bits are false), otherwise false. Question Q-de8593251c7748d5 (open)
Error Handling and Exception Safety
Neither error codes nor separate error states are defined for none. According to the specification, the function is declared as noexcept and has the classification exception safe (exception safe) [SWS_CORE_01746]. Thus, no C++ exceptions occur in the event of an error or during execution.
Concurrency and Limitations
Since none is declared as const[SWS_CORE_01746], the method call does not modify the internal state of the object. Concurrent read calls on the same Bitset object are therefore expected to be non-critical and reentrant concurrently, provided that no concurrent write modifications take place on the same instance. Question Q-cf92e9abf57e9678 (open)
This usage note was generated automatically by an AI assistant and is based on the requirements of the specification.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 0868e1227ad2ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The member function reset() resets the state of an instance of ara::core::Bitset according to specification [SWS_CORE_01727]. The function is provided via the header file #include "ara/core/bitset.h" and has the signature Bitset<N>& reset() noexcept;.
Usage and Semantics
The function takes no parameters and operates synchronously on the calling object. Due to the specified reference to the usual usage in [bitset], the call is likely to reset all contained bits to false (or 0) and return a reference to its own bitset instance (*this), enabling method chaining. Question Q-89116316a65e0772 (open)
Error Handling and Exception Safety
According to [SWS_CORE_01727], the function is declared as noexcept and has the classification “exception safe”. Since, unlike the parameterized overload, no index check is required, no error states or error codes occur with the parameterless variant.
Interaction and Distinction
In the same scope ara::core::Bitset, the overload reset(std::size_t pos) according to [SWS_CORE_01728] exists. This specifically resets a single bit, but returns a Result<Bitset<N>&> and reports a IsoStdOutOfRangeViolation if pos is invalid.
Functions with the same name also exist in module core for ara::core::Optional according to [SWS_CORE_01136] and ara::core::Optional<T&> according to [SWS_CORE_01165] from #include "ara/core/optional.h", which discard the contained value and have the return type void.
This text was generated by an AI and serves as guidance. Only the specifications of the AUTOSAR standard are binding.
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-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 6ee8bcd28b61ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The member function reset of class ara::core::Bitset resets a single bit at the specified position pos synchronously to the value 0 [SWS_CORE_01728]. The function follows the behavior of std::bitset, but exhibits two major deviations: it is declared as noexcept and returns the result in a Result<Bitset<N>&> to represent error situations without C++ exceptions [SWS_CORE_01728].
Error handling
If the passed index pos does not correspond to a valid bit position within the bitset, the violation IsoStdOutOfRangeViolation is triggered instead of std::out_of_range[SWS_CORE_01728]. In the event of an error, this is provided as an error state in the returned Result object, so that the operation remains exception-safe despite an invalid parameter value [SWS_CORE_01728].
Interaction and Distinction
In module core, the parameterless overload reset() additionally exists for ara::core::Bitset, which clears all bits of the container at once and directly returns a reference to the object [SWS_CORE_01727]. Furthermore, the related requirements [SWS_CORE_01136] and [SWS_CORE_01165] define a method of the same name for ara::core::Optional, which discards the contained value there.
Concurrency
Since reset modifies the internal state of the bitset, a concurrent call on the same instance without external synchronization is likely not thread-safe (interpretation: adoption of usual C++ container semantics). Question Q-e2e1c041eadedf0f (open)
This text was generated by an AI based on the AUTOSAR R25-11 specification.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 69ac29c94b17ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The synchronous member function set() of class ara::core::Bitset sets all contained bits of the object to the value true ([SWS_CORE_01725]). In behavior, it corresponds to the operation of std::bitset from the ISO C++ standard and is available via header ara/core/bitset.h ([SWS_CORE_01725]). The method call takes no parameters and returns an lvalue reference to the modified bitset (Bitset<N>&) ([SWS_CORE_01725]), allowing direct chaining of further calls on the same instance.
The operation is declared as noexcept and possesses the property exception safe ([SWS_CORE_01725]). Because it iterates over all bits or sets the overall state, unlike position-based accesses, no range errors occur. The specification makes no statement regarding thread safety; interpretation: Since the object state is mutated directly, parallel accesses to the same Bitset instance are likely not concurrency- or thread-safe without external protection. Question Q-f8c1b5721f668193 (open)
In interaction within module core, the function complements the overloaded variant set(std::size_t, bool) ([SWS_CORE_01726]). While the parameterless version is guaranteed to successfully set the entire field, the parameterized version specifically modifies a single bit, returns type Result<Bitset<N>&>, and signals via a IsoStdOutOfRangeViolation if an invalid position index is passed ([SWS_CORE_01726]).
This usage note is based on the AUTOSAR Adaptive specification for release R25-11 and was generated automatically.
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-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 78b604750828Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The member function set of class ara::core::Bitset modifies the bit at the specified position pos to the value val according to [SWS_CORE_01726]. The function is declared in header #include "ara/core/bitset.h" and operates synchronously as well as exception-safely.
Compared to the standard behavior of std::bitset, the function exhibits two key deviations ([SWS_CORE_01726]):
The function is declared as noexcept and throws no C++ exceptions.
If pos does not correspond to a valid bit position, IsoStdOutOfRangeViolation is triggered instead of std::out_of_range.
An Result<Bitset<N>&> is returned as the return value ([SWS_CORE_01726]). In the event of success, Result contains a reference to the modified bitset object. If pos lies outside the valid range, Result transports the corresponding error violation.
In contrast to the parameterless variant set() ([SWS_CORE_01725]), which sets all bits and directly returns Bitset<N>&, this position-based overload requires evaluating the Result object to handle range errors ([SWS_CORE_01726]).
This usage note was generated automatically based on the AUTOSAR specification R25-11.
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-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: d1ea13b75993ProvenanceOpen questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
use
The synchronous member function test of class ara::core::Bitset checks the state of the bit at the passed position pos according to [SWS_CORE_01743]. The desired bit position pos of type std::size_t is passed as a call parameter. The function synchronously returns a value of type bool, where true indicates that the bit is set and false that it is not set. To integrate and use the function in the Core module of the Adaptive Platform, header ara/core/bitset.h must be included [SWS_CORE_01743].
Error Handling and Deviations
The functional behavior generally follows the semantics of std::bitset, but exhibits two major system-specific deviations [SWS_CORE_01743]:
The signature is declared as noexcept and guarantees complete exception safety (exception safe) [SWS_CORE_01743].
If bit position pos does not correspond to a valid bit position within the object, violation IsoStdOutOfRangeViolation is raised instead of an exception of type std::out_of_range[SWS_CORE_01743]. Its description is based on that of std::out_of_range[SWS_CORE_01743].
Concurrency and Limitations
Since the function is specified as const, it does not modify the instance. Multiple concurrent read accesses to the same bitset instance are therefore expected to be executable in regular operation without data conflicts (interpretation). Question Q-585dbdfefac63391 (open) If write modifications take place on the same instance at the same time, external synchronization by the caller is presumably required.
This text was generated by an AI based on the AUTOSAR R25-11 specification.
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
[AUTOSAR defined] not present in ISO-14882. Converts the contents of the bitset to a std:: uint16_t from [SWS_APT_00025]
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 6284644210b2ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The member function to_uint16t of class ara::core::Bitset converts the content of the bitset into an integer value of type std::uint16_t ([SWS_CORE_01737], [SWS_APT_00025]). It represents an AUTOSAR-specific extension and is not contained in the ISO C++ standard ISO-14882 ([SWS_CORE_01737]). The synchronous call is provided via header ara/core/bitset.h ([SWS_CORE_01737]).
In the generated return value, the first bit of the bitset corresponds to the least significant bit and the last bit to the most significant bit of the number ([SWS_CORE_01737]). Since the method is specified as constexpr, it can also be evaluated at compile time on constant instances ([SWS_CORE_01737]).
The operation is specified as thread-safe and exception safe ([SWS_CORE_01737]). If the bit value cannot be represented in the value range of std::uint16_t, a IsoStdOverflowErrorViolation occurs ([SWS_CORE_01737]). Interpretation: Due to the noexcept declaration, this violation is not expected to be reported via regular C++ exceptions, but to lead to handling via platform-specific mechanisms for violations. Question Q-785057e36fb7e434 (open)
This usage note was automatically generated and is based on the AUTOSAR specification R25-11.
IsoStdOverflowEr- If the integral value x corresponding to the bits in the bitset cannot rorViolation be represented as the return type
Rückgabewert
Typ
Beschreibung
std::uint16_t
The 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.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: a8e87f48809eProvenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Usage and Semantics
The method to_uint32t is a parameterless, synchronous member function of class ara::core::Bitset provided via header ara/core/bitset.h[SWS_CORE_01738]. It converts the bits of the bitset instance into an unsigned 32-bit integer value of type std::uint32_t[SWS_CORE_01738]. The function is not included in ISO-14882, but is defined as an AUTOSAR-specific alias for ara::core::Bitset::to_ulong that explicitly uses data type std::uint32_t from [SWS_APT_00028][SWS_CORE_01738]. When mapping the bit sequence, the first bit of the bitset corresponds to the least significant bit of the return value and the last bit corresponds to the most significant bit [SWS_CORE_01738].
Error Handling and Boundary Conditions
For the error case, the specification defines the violation IsoStdOverflowErrorViolation, which occurs when the integer value corresponding to the set bits cannot be represented in the value range of the return type [SWS_CORE_01738].
Concurrency and Execution Context
The function is declared with constexpr and noexcept[SWS_CORE_01738]. Regarding execution safety, it is specified as thread-safe (thread-safe) and exception safe (exception safe) [SWS_CORE_01738].
This usage note was generated automatically based on the specification.
IsoStdOverflowEr- If the integral value x corresponding to the bits in the bitset cannot rorViolation be represented as the return type
Rückgabewert
Typ
Beschreibung
std::uint32_t
The 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.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 305531790779Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
use
The member function to_uint64t of class ara::core::Bitset synchronously converts the bits contained in the bitset into an integer value of type std::uint64_t ([SWS_CORE_01739]). The operation is an AUTOSAR-specific extension and not defined in ISO-14882 ([SWS_CORE_01739]). It acts as an alias for method ara::core::Bitset::to_ullong, but mandatorily and explicitly uses type std::uint64_t according to [SWS_APT_00031] ([SWS_CORE_01739]). The declaration is provided via header file #include "ara/core/bitset.h" ([SWS_CORE_01739]).
For the bitwise mapping of the return value, the first bit of the bitset corresponds to the least significant bit of the generated value and the last bit is assigned to the most significant bit ([SWS_CORE_01739]). Thanks to the qualification as constexpr, evaluation can take place both at runtime and at compile time in constant expressions ([SWS_CORE_01739]).
Error Handling and Concurrency
Regarding execution safety, the function is declared with noexcept, classified as exception safe (exception safe), and unconditionally thread-safe (thread-safe) callable ([SWS_CORE_01739]). If the integer value corresponding to the bits cannot be represented in the target type, error case IsoStdOverflowErrorViolation is present ([SWS_CORE_01739]). The interface satisfies the overarching requirement [RS_AP_00130].
This usage note was generated automatically based on the AUTOSAR specification.
IsoStdOverflowEr- If the integral value x corresponding to the bits in the bitset cannot rorViolation be represented as the return type
Rückgabewert
Typ
Beschreibung
std::uint64_t
The 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.
[AUTOSAR defined] not present in ISO-14882. Converts the contents of the bitset to a std:: uint8_t from [SWS_APT_00022]
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 9502dfbaed0eProvenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
use
The member function to_uint8t of class ara::core::Bitset synchronously converts the stored bitset content into an unsigned 8-bit integer value of type std::uint8_t according to [SWS_CORE_01736] and [SWS_APT_00022]. This is an AUTOSAR-specific functional extension that does not exist in standard ISO-14882 [SWS_CORE_01736]. The function is provided via header ara/core/bitset.h, is parameterless, and is declared as constexpr and noexcept[SWS_CORE_01736]. The first bit of the bit sequence corresponds to the least significant bit (LSB) and the last bit to the most significant bit (MSB) of the returned value [SWS_CORE_01736].
Error handling
If the integer value corresponding to the bits in the bitset cannot be represented in target type std::uint8_t, violation IsoStdOverflowErrorViolation occurs [SWS_CORE_01736]. Despite the noexcept declaration, the function is specified as exception safe with respect to exception safety [SWS_CORE_01736].
Concurrency and Interaction
As a const member function, to_uint8t is explicitly declared as thread-safe[SWS_CORE_01736], so that concurrent read accesses by multiple threads to the same instance are safe. The representation of the target type is based on the specification in [SWS_APT_00022].
This usage note was generated automatically based on the specification of AUTOSAR Adaptive Release R25-11.
IsoStdOverflowEr- If the integral value x corresponding to the bits in the bitset cannot rorViolation be represented as the return type
Rückgabewert
Typ
Beschreibung
std::uint8_t
The 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.
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-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 80c15d0568edProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The member function to_ullong of class ara::core::Bitset synchronously converts the stored bit sequence into an integer value of type unsigned long long[SWS_CORE_01735]. It is defined in header #include "ara/core/bitset.h" and declared as constexpr as well as noexcept compared to the ISO standard std::bitset[SWS_CORE_01735].
Regarding error handling and exception behavior, the following specifications apply:
Overflow handling: If the integer value represented by the set bits cannot be represented in the return type, violation IsoStdOverflowErrorViolation is raised instead of an std::overflow_error exception [SWS_CORE_01735].
Exception safety: The function is classified as exception safe and throws no C++ exceptions due to the noexcept specification [SWS_CORE_01735].
In interaction with further interfaces, AUTOSAR Adaptive provides a typed alternative with to_uint64t, which acts as a direct alias for to_ullong, but explicitly returns the fixed-width type std::uint64_t[SWS_CORE_01739]. For both functions, the first bit of the bitset corresponds to the least significant bit (LSB) and the last bit to the most significant bit (MSB) of the resulting numerical value [SWS_CORE_01739]. Since to_ullong is a const member function and the functional equivalent is specified as thread-safe, a concurrent read call on the same instance is expected to be thread-safe as well [SWS_CORE_01739]. Question Q-075766fabc193ce8 (open)
This usage note was generated automatically and is based on the AUTOSAR Adaptive R25-11 specification status.
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-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 58ed0033ea8eProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The member function ara::core::Bitset::to_ulong synchronously converts the set bits of a bitset instance into an integer value of type unsigned long[SWS_CORE_01734]. The function requires header file ara/core/bitset.h and belongs to the scope of class ara::core::Bitset[SWS_CORE_01734]. Due to its declaration with signature constexpr unsigned long to_ulong() const noexcept;, evaluation can take place both at runtime and at compile time in constant expressions [SWS_CORE_01734].
In its error behavior, the function differs significantly from the ISO standard std::bitset: If the integer value corresponding to the bits cannot be represented in return type unsigned long, a IsoStdOverflowErrorViolation is thrown instead of an exception of type std::overflow_error[SWS_CORE_01734]. Notwithstanding this violation condition, the function is declared as noexcept and is formally considered exception safe (exception safe) [SWS_CORE_01734].
In interaction with other conversion functions, AUTOSAR Adaptive provides a direct counterpart with to_uint32t, which acts as an alias for to_ulong but type-accurately returns a std::uint32_t[SWS_CORE_01738]. Regarding concurrency, the method is expected to be thread-safe for concurrent read accesses to the same bitset (interpretation), as it is defined as const and the corresponding requirement to_uint32t is explicitly marked as thread-safe [SWS_CORE_01738]. Question Q-59f95b86801a697d (open)
This usage note was automatically created based on AUTOSAR specification R25-11.
gemini-3.8-flash-low· 2026-10-13 · German original