DEENESPTFRRUARHIKOZHNL

类 ara::core::BasicString

[SWS_CORE_03000]

template <typename Allocator = {<fq-allocator>}> class BasicString {...};

Implementation of std::pmr::basic_string type from [basic.string]

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

用户指南人工智能生成

通过分配器管理动态字符串,并无缝集成 StringView 视图。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: a5b143bf326f 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

通过分配器管理动态字符串,并无缝集成 StringView 视图。

类 ara::core::BasicString 在模块 core 中提供了基于 C++ PMR 标准的感知内存分配器的字符串实现 [SWS_CORE_03005]。它接管动态缓冲区管理,支持从预留到追加的操作,并与 StringView 无缝协作。作为关键的安全相关约束,错误的访问不会通过 STL 异常报告,而是通过诸如 IsoStdOutOfRangeViolation 等 AUTOSAR 特定违例报告 [SWS_CORE_03063]。

上下文

类 ara::core::BasicString 在 AUTOSAR Adaptive Platform 的模块 core 中映射了 C++ 标准类型 std::pmr::basic_string 的实现(定义在头文件 #include "ara/core/string.h" 中)。它表示一个通过类型参数 Allocator 参数化的动态字符串类模板 [SWS_CORE_03005]。相比通用标准 [basic.string],AUTOSAR 规范具有重要的特化:字符类型 traits_type 强制指定为 std::char_traits<char> [SWS_CORE_03003],size_type 特化为 std::size_t [SWS_CORE_03012],且 charT 被 value_type 替换 [SWS_CORE_03004]。最重要的交互伙伴是执行分配的内存管理器(通过 allocator_type)以及引用类 StringView,BasicString 通过直接转换运算符 [SWS_CORE_03301] 和构造函数 [SWS_CORE_03302] 与之紧密协作。

生命周期

实例的生命周期始于其构造。除了默认构造 [SWS_CORE_03024] 之外,还可以显式传递特定分配器 [SWS_CORE_03025]。此外,还可以从 C 字符串 [SWS_CORE_03029]、子字符串 [SWS_CORE_03026]、初始化列表 [SWS_CORE_03032]、迭代器 [SWS_CORE_03031] 或诸如 StringView [SWS_CORE_03302] 等视图创建字符串。复制操作 [SWS_CORE_03020] 通过分配器请求新的动态内存。为了以节省资源的方式进行所有权转移,提供了声明为 noexcept 的移动构造 [SWS_CORE_03022]。

在生命周期内,实例自主管理其内存区域。内容可通过赋值([SWS_CORE_03021]、[SWS_CORE_03084])、借助 resize 调整大小([SWS_CORE_03058]、[SWS_CORE_03059])或使用 clear [SWS_CORE_03057] 重置来进行修改。两个字符串可通过 swap 进行高效交换,这在条件满足时是异常安全的 [SWS_CORE_03412]。在生命周期结束时,析构函数 ~BasicString() [SWS_CORE_03038] 通过关联的分配器释放已分配的内存。关于并发性,BasicString 不提供自有的线程同步;因此对同一实例的并发修改性访问需要外部保护。

使用路径

典型的使用路径包括实例化、可选的缓冲区预留、逐步修改以及最终的只读访问或传递:

Typischer Nutzungspfad von BasicString应用BasicStringAllocatorBasicString(alloc)allocate(...)Speicher bereitgestelltInstanz bereitreserve(64)append(sv)operator StringView()StringView Instanz

时序图:从初始化、缓冲区预留、文本修改到视图转换的典型交互时序。来源:[SWS_CORE_03025]、[SWS_CORE_03054]、[SWS_CORE_03308]、[SWS_CORE_03301]。

错误场景

规范针对非法调用定义了特定的违例类型,以替代标准异常:

关于异常安全性,大多数分配和修改方法都被归为“非异常安全”(not exception safe),因为内存不足或错误的参数可能会导致操作失败。异常保证主要由声明为 noexcept 的操作提供,例如移动构造 [SWS_CORE_03022],以及有条件的移动赋值 [SWS_CORE_03023] 和 swap [SWS_CORE_03412]。使用 IsoStdOutOfRangeViolation 和 IsoStdLengthErrorViolation 替代标准异常,大概是由于在安全相关执行环境中确定性地反映错误这一全平台方法所致。 问题 Q-0406eab8e8556fcd (未决)

本指南基于 AUTOSAR Adaptive Platform R25-11 中针对 ara::core::BasicString 的规范。

成员图

类图

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

G nara__core__BasicString716 BasicString + npos + BasicString() + Basic() + operator=() + ~BasicString() + capacity() + clear() + empty() + length() + max_size() + reserve() + resize() + shrink_() + size() + at() + back() + c_str() … 32 weitere

详细视图

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

构造函数和析构函数

BasicString 函数 4

≙ [basic.string]

重载 BasicString 4
BasicString (const BasicString &str); SWS_CORE_03020
BasicString (BasicString &&str) noexcept=default; SWS_CORE_03022
explicit BasicString (StringView sv, const Allocator &a=Allocator()); SWS_CORE_03302
template <class T> BasicString (const T &t, size_type pos, size_type n, const Allocator &a=Allocator()); SWS_CORE_03303

≙ [basic.string]

方法

append 函数 9

≙ [basic.string]

重载 append 9
BasicString & append (const BasicString &str); SWS_CORE_03076
template <class InputIterator> BasicString & append (InputIterator first, InputIterator last); SWS_CORE_03081
template <class T> BasicString & append (const T &t, size_type pos, size_type n=npos); SWS_CORE_03309
assign 函数 10

≙ [basic.string]

重载 assign 10
BasicString & assign (const BasicString &str); SWS_CORE_03084
BasicString & assign (BasicString &&str) noexcept(std::allocator_ traits< Allocator >::propagate_on_container_move_ assignment::value||std::allocator_traits< Allocator >::is_always_ equal::value); SWS_CORE_03085
template <class InputIterator> BasicString & assign (InputIterator first, InputIterator last); SWS_CORE_03091
template <class T> BasicString & assign (const T &t, size_type pos, size_type n=npos); SWS_CORE_03306
at 函数 2

except for the following deviations: 1. if (pos >= size()) IsoStdOutOfRangeViolation is raised instead of std:: out_of_range ≙ [basic.string]

重载 at 2
back 函数 2

≙ [basic.string]

重载 back 2
Basic 函数 16

≙ [basic.string]

重载 Basic 16
begin 函数 2

≙ [basic.string]

重载 begin 2
iterator begin () noexcept; SWS_CORE_03039
const_iterator begin () const noexcept; SWS_CORE_03040
c_str 函数

except for the following deviations: 1. charT replaced with value_type ≙ [basic.string]

const value_type * c_str () const noexcept;
capacity 函数

≙ [basic.string]

size_type capacity () const noexcept;
cbegin 函数

≙ [basic.string]

const_iterator cbegin () const noexcept;
cend 函数

≙ [basic.string]

const_iterator cend () const noexcept;
clear 函数

≙ [basic.string]

void clear () noexcept;
compare 函数 9

≙ [basic.string]

重载 compare 9
int compare (StringView sv) const noexcept; SWS_CORE_03321
int compare (size_type pos1, size_type n1, StringView sv) const; SWS_CORE_03322
template <typename T> int compare (size_type pos1, size_type n1, const T &t, size_type pos2, size_type n2=npos) const; SWS_CORE_03323
int compare (const BasicString &str) const noexcept; SWS_CORE_03346
int compare (size_type pos1, size_type n1, const BasicString &str) const; SWS_CORE_03347
int compare (size_type pos1, size_type n1, const BasicString &str, size_type pos2, size_type n2=npos) const; SWS_CORE_03348
int compare (const value_type *s) const; SWS_CORE_03349
int compare (size_type pos1, size_type n1, const value_type *s) const; SWS_CORE_03350
int compare (size_type pos1, size_type n1, const value_type *s, size_type n2) const; SWS_CORE_03351
copy 函数

except for the following deviations: 1. charT replaced with value_type 2. if ( pos > size() ) IsoStdOutOfRangeViolation is raised instead of std:: out_of_range ≙ [basic.string]

size_type copy (value_type *s, size_type n, size_type pos=0) const;
crbegin 函数

≙ [basic.string]

const_reverse_iterator crbegin () const noexcept;
crend 函数

≙ [basic.string]

const_reverse_iterator crend () const noexcept;
data 函数 2

except for the following deviations: 1. charT replaced with value_type ≙ [basic.string]

重载 data 2
const value_type * data () const noexcept; SWS_CORE_03070
value_type * data () noexcept; SWS_CORE_03071
empty 函数

≙ [basic.string]

bool empty () const noexcept;
end 函数 2

≙ [basic.string]

重载 end 2
iterator end () noexcept; SWS_CORE_03041
const_iterator end () const noexcept; SWS_CORE_03042
erase 函数 3

except for the following deviations: 1. charT replaced with value_type 2. if ( pos > size() ) IsoStdOutOfRangeViolation is raised instead of std:: out_of_range ≙ [basic.string]

重载 erase 3
find 函数 5

except for the following deviations: 1. charT replaced with value_type ≙ [basic.string]

重载 find 5
size_type find (StringView sv, size_type pos=0) const noexcept; SWS_CORE_03315
size_type find (const BasicString &str, size_type pos=0) const noexcept; SWS_CORE_03407
size_type find (const value_type *s, size_type pos=0) const; SWS_CORE_03408
size_type find (const value_type *s, size_type pos, size_type n) const; SWS_CORE_03409
find_first_ 函数 8

≙ [basic.string]

重载 find_first_ 8
size_type find_first_of (const BasicString &str, size_type pos=0) const noexcept; SWS_CORE_03329
size_type find_first_of (const value_type *s, size_type pos, size_type n) const; SWS_CORE_03330
size_type find_first_of (const value_type *s, size_type pos=0) const; SWS_CORE_03331
size_type find_first_of (value_type c, size_type pos=0) const; SWS_CORE_03332
size_type find_first_not_of (const BasicString &str, size_type pos=0) const noexcept; SWS_CORE_03337
size_type find_first_not_of (const value_type *s, size_type pos, size_type n) const; SWS_CORE_03338
size_type find_first_not_of (const value_type *s, size_type pos=0) const; SWS_CORE_03339
size_type find_first_not_of (value_type c, size_type pos=0) const; SWS_CORE_03340

≙ [basic.string]

size_type find_first_not_of (StringView sv, size_type pos=0) const noexcept;

except for the following deviations: 1. charT replaced with value_type ≙ [basic.string]

size_type find_first_of (StringView sv, size_type pos=0) const noexcept;
find_last_ 函数 8

≙ [basic.string]

重载 find_last_ 8
size_type find_last_of (const BasicString &str, size_type pos=npos) const noexcept; SWS_CORE_03333
size_type find_last_of (const value_type *s, size_type pos, size_type n) const; SWS_CORE_03334
size_type find_last_of (const value_type *s, size_type pos=npos) const; SWS_CORE_03335
size_type find_last_of (value_type c, size_type pos=npos) const; SWS_CORE_03336
size_type find_last_not_of (const BasicString &str, size_type pos=npos) const noexcept; SWS_CORE_03341
size_type find_last_not_of (const value_type *s, size_type pos, size_type n) const; SWS_CORE_03342
size_type find_last_not_of (const value_type *s, size_type pos=npos) const; SWS_CORE_03343
size_type find_last_not_of (value_type c, size_type pos=npos) const; SWS_CORE_03344

≙ [basic.string]

size_type find_last_not_of (StringView sv, size_type pos=npos) const noexcept;

≙ [basic.string]

size_type find_last_of (StringView sv, size_type pos=npos) const noexcept;
front 函数 2

≙ [basic.string]

重载 front 2

≙ [basic.string]

allocator_type get_allocator () const noexcept;
insert 函数 11

≙ [basic.string]

重载 insert 11
BasicString & insert (size_type pos, const BasicString &str); SWS_CORE_03093
template <class InputIterator> iterator insert (const_iterator p, InputIterator first, InputIterator last); SWS_CORE_03100
template <class T> BasicString & insert (size_type pos1, const T &t, size_type pos2, size_type n=npos); SWS_CORE_03311
length 函数

≙ [basic.string]

size_type length () const noexcept;
max_size 函数

≙ [basic.string]

size_type max_size () const noexcept;
pop_back 函数

≙ [basic.string]

void pop_back ();
push_ 函数

≙ [basic.string]

void push_back (value_type c);
rbegin 函数 2

≙ [basic.string]

重载 rbegin 2
reverse_iterator rbegin () noexcept; SWS_CORE_03043
const_reverse_iterator rbegin () const noexcept; SWS_CORE_03044
rend 函数 2

≙ [basic.string]

重载 rend 2
const_reverse_iterator rend () const noexcept; SWS_CORE_03046
replace 函数 14

≙ [basic.string]

重载 replace 14
reserve 函数

except for the following deviations: 1. if (res_arg > max_size()) IsoStdLengthErrorViolation is raised instead of std:: length_error ≙ [basic.string]

void reserve (size_type res_arg=0);
resize 函数 2

except for the following deviations: 1. if (sz > max_size()) IsoStdLengthErrorViolation is raised instead of std:: length_error ≙ [basic.string]

重载 resize 2
void resize (size_type sz); SWS_CORE_03058
void resize (size_type sz, value_type c); SWS_CORE_03059
rfind 函数 5

except for the following deviations: 1. charT replaced with value_type ≙ [basic.string]

重载 rfind 5
size_type rfind (StringView sv, size_type pos=npos) const noexcept; SWS_CORE_03316
size_type rfind (const BasicString &str, size_type pos=npos) const noexcept; SWS_CORE_03325
size_type rfind (const value_type *s, size_type pos, size_type n) const; SWS_CORE_03326
size_type rfind (const value_type *s, size_type pos=npos) const; SWS_CORE_03327
shrink_ 函数

≙ [basic.string]

void shrink_to_fit ();
size 函数

≙ [basic.string]

size_type size () const noexcept;
substr 函数

except for the following deviations: 1. if ( pos > size() ) IsoStdOutOfRangeViolation is raised instead of std:: out_of_range ≙ [basic.string]

BasicString substr (size_type pos=0, size_type n=npos) const;
swap 函数

≙ [basic.string]

void swap (BasicString &str) noexcept(std::allocator_traits< Allocator >::propagate_on_container_swap::value||std::allocator_traits< Allocator >::is_always_equal::value);

运算符

operator= 函数 6

≙ [basic.string]

重载 = 6
BasicString & operator= (const BasicString &str); SWS_CORE_03021
BasicString & operator= (BasicString &&str) noexcept(std::allocator_ traits< Allocator >::propagate_on_container_move_ assignment::value||std::allocator_traits< Allocator >::is_always_ equal::value); SWS_CORE_03023
BasicString & operator= (const value_type *s); SWS_CORE_03035
operator[] 函数 2

≙ [basic.string]

重载 [] 2

≙ [basic.string]

operator StringView () const noexcept;

类型别名

allocator_type 类型别名

≙ [basic.string]

using allocator_type = Allocator;
const_iterator 类型别名

Implementation {<const-iterator-type>} shall be an implementation-defined type ≙ [basic.string]

using const_iterator = {<const-iterator-type>};
const_pointer 类型别名

≙ [basic.string]

using const_pointer = typename std::allocator_ traits<Allocator>::const_pointer;
const_reference 类型别名

≙ [basic.string]

using const_reference = const value_type&;

≙ [basic.string]

using const_reverse_iterator = std::reverse_iterator<const_iterator>;
difference_type 类型别名

≙ [basic.string]

using difference_type = typename std::allocator_ traits<Allocator>::difference_type;
iterator 类型别名

Implementation {<iterator-type>} shall be an implementation-defined type ≙ [basic.string]

using iterator = {<iterator-type>};
pointer 类型别名

≙ [basic.string]

using pointer = typename std::allocator_traits<Allocator>::pointer;
reference 类型别名

≙ [basic.string]

reverse_iterator 类型别名

≙ [basic.string]

using reverse_iterator = std::reverse_iterator<iterator>;
size_type 类型别名

As per corresponding member in [basic.string] except for the following deviations: 1. Type shall be specialized to std::size_t ≙ std::size_t

using size_type = typename std::allocator_traits<Allocator>::size_ type;
traits_type 类型别名

except for the following deviations: 1. Type shall be specialized to std::char_traits<char> ≙ std::char_traits

using traits_type = typename std::char_traits<char>;
value_type 类型别名

except for the following deviations: 1. Type shall be specialized to std::allocator_traits<Allocator>::value_type ≙ std::allocator_traits

using value_type = typename std::allocator_traits<Allocator>::value_ type;

常量

npos 变量

≙ [basic.string]

static constexpr size_type const npos = size_type(-1);

方法文档

函数 Basic [SWS_CORE_03072]

BasicString & operator+= (const BasicString &str);

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString(来自 #include "ara/core/string.h" 的 [SWS_CORE_03072])的赋值运算符 operator+= 将传入的 BasicString 实例的内容同步追加到当前对象中。其功能语义遵循 [basic.string]([SWS_CORE_03072])中的相应用法。该调用返回对已修改实例(*this)的引用,从而支持链式赋值。

关于错误处理,该操作在规范中被明确声明为“not exception safe”([SWS_CORE_03072])。对于此元素,未定义特定的错误代码或通过 DET 或 DEM 的通知机制。因此,如果内部内存分配失败,该方法不提供异常安全保证。

关于并发性和限制,需要注意的是,该调用会直接修改实例的状态。由于负载未提及同步机制,因此在没有外部同步的情况下,跨多个线程对同一对象的并发读写访问可能不是线程安全的。 问题 Q-352f9d72ad3dfdbd (未决)

该运算符与 operator+= 的其他重载一起构成了字符串追加接口,例如用于单个字符([SWS_CORE_03074])、原生字符指针([SWS_CORE_03073])、初始化列表([SWS_CORE_03075])以及 StringView([SWS_CORE_03307])。所有这些修改运算符均具有“not exception safe”属性,并对 ara::core::BasicString([SWS_CORE_03024]、[SWS_CORE_03025])的基本构造函数进行补充。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03072
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03072@rel:R25-11#37ba92ea
Content hash
37ba92ea
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03072
Status: valid/unmigrated Version: rel:R25-11#62f771f6 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_03072@rel:R25-11#62f771f6
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

函数 Basic [SWS_CORE_03073]

BasicString & operator+= (const value_type *s);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

使用

类 ara::core::BasicString 的赋值运算符 operator+= 将基于指针的字符串同步追加到现有字符串中,并返回对修改后对象的引用 [SWS_CORE_03073]。该函数通过头文件 #include "ara/core/string.h" 引入,并接收一个类型为 const value_type * 的指针 s 作为参数 [SWS_CORE_03073]。功能语义遵循来自 [basic.string] 的标准化定义,其中主要区别在于标准字符类型 charT 被替换为 value_type [SWS_CORE_03073]。

错误处理与限制

在异常安全性方面,该成员函数明确声明为非异常安全(“not exception safe”)[SWS_CORE_03073]。未为该运算符指定特定的错误代码、用于指示错误的返回值或向 DET 或 DEM 发送的错误消息。解释:如果在字符串扩展期间必要的内部内存分配失败,则可能无法保证一致的对象状态,并且在 AUTOSAR Adaptive 环境中不存在单独的错误通道。 问题 Q-a1498ddbc09bcfa9 (未决)

相互作用

该方法补充了 ara::core::BasicString 内的其他赋值运算符,这些运算符实现了追加完整字符串实例 [SWS_CORE_03072]、单个字符 [SWS_CORE_03074]、初始化列表 [SWS_CORE_03075] 或 StringView 对象 [SWS_CORE_03307]。与针对原始字符指针的构造函数 [SWS_CORE_03028] [SWS_CORE_03029] 一样,所有这些变体均被指定为非异常安全。

该文本由 AI 生成,用作参考指引。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03073
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03073@rel:R25-11#232fd22f
Content hash
232fd22f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03073
Status: valid/unmigrated Version: rel:R25-11#8d3dfe7e 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_03073@rel:R25-11#8d3dfe7e
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

函数 Basic [SWS_CORE_03074]

BasicString & operator+= (value_type c);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

类 ara::core::BasicString 的成员函数 operator+= 允许将类型为 value_type 的单个字符 c 同步追加到调用字符串对象 [SWS_CORE_03074] 中。该声明包含在头文件 ara/core/string.h 中 [SWS_CORE_03074]。其行为符合 [basic.string] 中的规范,不同之处在于参数类型 charT 被替换为 value_type [SWS_CORE_03074]。作为返回值,提供了对修改后对象的引用(BasicString &),这支持链式调用。

在健壮性和错误处理方面,该操作被归类为 not exception safe [SWS_CORE_03074]。未为此函数定义特定的错误代码以及向 DET 或 DEM 发送的消息。解释:归类为非异常安全可能是因为在超出当前缓冲区容量时,必须通过底层分配器触发动态分配,而在内存不足时该分配可能会失败。 问题 Q-d74ec80829327ce0 (未决)

在并发性和约束条件方面,该函数直接修改实例;因此,在没有外部同步的情况下进行并发读写访问是不安全的。在与其他接口的交互中,该运算符补充了通过构造函数(如 [SWS_CORE_03024] 或 [SWS_CORE_03025])进行的实例化,以及针对整字符串 [SWS_CORE_03072]、字符串指针 [SWS_CORE_03073]、初始化列表 [SWS_CORE_03075] 和字符串视图 [SWS_CORE_03307] 的替代复合赋值。

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

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

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

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

函数 Basic [SWS_CORE_03075]

BasicString & operator+= (std::initializer_list< value_type >);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

ara::core::BasicString 的成员函数 operator+=([SWS_CORE_03075])将 std::initializer_list<value_type> 的字符同步追加到现有字符串对象中。作为返回值,该方法提供对修改后字符串的引用(*this)。其行为遵循针对 [basic.string] 的 C++ 标准,其中 charT 被替换为 value_type([SWS_CORE_03075])。要使用该函数,必须包含头文件 ara/core/string.h([SWS_CORE_03075])。

在错误处理和健壮性方面,该函数被归类为 not exception safe([SWS_CORE_03075])。解释:可以推测,在必要的重新分配期间如果内存不足,可能会引发异常,而无法对先前的缓冲区内容提供强异常保证。 问题 Q-0f3d6328fb6bfd73 (未决)

关于并发性和限制,调用在调用线程的上下文中同步进行。由于被调用的实例会被直接修改,因此在没有外部同步的情况下多个线程的同时访问不是线程安全的。

在与其他接口的交互中,该重载补充了 ara::core::BasicString 的其他追加运算符,包括追加字符串([SWS_CORE_03072])、字符数组([SWS_CORE_03073])、单个字符([SWS_CORE_03074])或 StringView([SWS_CORE_03307])。此外,初始化列表在语义上与相应的构造函数相对应([SWS_CORE_03032])。

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

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

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

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

函数 Basic [SWS_CORE_03307]

BasicString & operator+= (StringView sv);

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString 的成员函数 operator+= 将通过 StringView sv 传入的字符序列同步追加到调用的字符串对象中,并返回该修改后对象的引用 [SWS_CORE_03307]。该操作通过头文件 #include "ara/core/string.h" 定义,其功能行为遵循 [basic.string] 的通用惯例 [SWS_CORE_03307]。

错误处理与并发

在执行方面,该函数明确分类为 not exception safe [SWS_CORE_03307]。未针对 DET 或 DEM 指定特定错误代码。如果延长字符串时内部内存分配失败,该实例的内部状态推测无法保证保持不变。由于缺乏集成的同步机制,在多个线程对同一实例进行并发写入或读取访问时,应假定缺乏线程安全性(解释)。 问题 Q-1bed85bd42475f62 (未决)

相互作用

该运算符无缝融入类 ara::core::BasicString 的结构中,并补充了 operator+= 针对完整字符串 [SWS_CORE_03072]、字符指针 const value_type* [SWS_CORE_03073]、单个字符 [SWS_CORE_03074] 和初始化列表 [SWS_CORE_03075] 的备选重载。所涉及字符串实例的创建通过该类的关联构造函数进行,例如默认构造函数 [SWS_CORE_03024] 或复制和移动构造函数 [SWS_CORE_03033]、[SWS_CORE_03034]。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03307
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03307@rel:R25-11#eca68507
Content hash
eca68507
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03307
Status: valid/unmigrated Version: rel:R25-11#49ff1728 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03307@rel:R25-11#49ff1728
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#dff07d2b2026-09-30
  • R19-11rel:R19-11#f3a51ca72026-10-14
  • R20-11rel:R20-11#eb9911662026-10-14
  • R21-11rel:R21-11#643b959e2026-10-14
  • R22-11rel:R22-11#62cca0c72026-10-14
  • R23-11rel:R23-11#94c578d72026-10-14
  • R24-11rel:R24-11#7d330f2f2026-10-14
  • R25-11rel:R25-11#49ff17282026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 Basic [SWS_CORE_03024]

BasicString () noexcept(noexcept(Allocator()));

As per corresponding usage in [basic.string]

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

使用

头文件 #include "ara/core/string.h" 中的函数 BasicString() 是类 ara::core::BasicString([SWS_CORE_03024])的无参默认构造函数。该调用同步执行,且作为构造函数不返回值。其行为遵循 [basic.string]([SWS_CORE_03024])中的相应定义;因此生成的实例大概率表示一个空字符串。 问题 Q-f36b11fa590a6111 (未决)

错误处理与异常安全性

该元素被指定为有条件异常安全(conditionally exception safe)([SWS_CORE_03024])。根据规范,不存在特定的错误代码、DET 或 DEM 消息。通过签名 BasicString () noexcept(noexcept(Allocator()));,异常安全性直接与分配器的默认构造函数耦合([SWS_CORE_03024])。如果 Allocator() 的创建未抛出异常,则 BasicString 的构造行为也保证不引发异常。

交互与限制

在 ara::core::BasicString 的其他接口上下文中,以下依赖关系具有相关性:

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

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitconditionally exception safe

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

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

函数 Basic [SWS_CORE_03025]

explicit BasicString (const Allocator &a) noexcept;

As per corresponding usage in [basic.string]

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

头文件 #include "ara/core/string.h" 中的显式构造函数 BasicString(const Allocator &a) 使用传入的分配器 [SWS_CORE_03025] 初始化 ara::core::BasicString 的空实例。语义行为遵循 C++ 标准章节 [basic.string] [SWS_CORE_03025]。通过关键字 explicit,禁止了从分配器实例进行无意的隐式类型转换 [SWS_CORE_03025]。

在错误处理和异常处理方面,该函数声明为 noexcept 并被指定为异常安全(exception safe)[SWS_CORE_03025]。与异常安全性有条件取决于 noexcept(noexcept(Allocator())) 的默认构造函数 [SWS_CORE_03024] 不同,此调用始终保证无异常地正确创建 [SWS_CORE_03025]、[SWS_CORE_03024]。解释:无条件异常安全的原因大概率在于,在初始化空字符串时无需执行消耗内存的分配步骤。 问题 Q-88df57e7a9c2abda (未决)

在与该类的其他构造函数(例如 [SWS_CORE_03026] 或 [SWS_CORE_03028],它们会复制数据并被归类为非异常安全 (not exception safe))的相互作用中,该构造函数可作为安全的切入点。生成的字符串随后可以通过诸如 operator+=([SWS_CORE_03072]、[SWS_CORE_03307])之类的修改器进行动态扩展,或者用作诸如 Bitset [SWS_CORE_01749] 之类类型的输入。

本段文本由 AI 创建,用作精选使用辅助。所有规范性要求均应以所引用的 AUTOSAR 规范为准。

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

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

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

函数 Basic [SWS_CORE_03026]

BasicString (const BasicString &str, size_type pos, const Allocator &a=Allocator());

As per corresponding usage in [basic.string]

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

使用

函数 Basic 是类 ara::core::BasicString 的一个构造函数,由头文件 #include "ara/core/string.h" 提供 [SWS_CORE_03026]。它根据 [basic.string] [SWS_CORE_03026] 的语义,从源对象 str 的索引位置 pos 开始同步生成一个新字符串作为子字符串。在此处理以下参数:

  • str:要复制的类型为 BasicString 的源实例引用 [SWS_CORE_03026]。
  • pos:类型为 size_type 的子字符串基于零的起始位置 [SWS_CORE_03026]。
  • a:用于内存管理的分配器,默认值为 Allocator() [SWS_CORE_03026]。

错误处理与异常安全性

在规范中,该函数被指定为 not exception safe 特性 [SWS_CORE_03026]。既未定义特定错误代码,也未定义 DET 或 DEM 报告。解释:由于构造函数遵循 [basic.string] 的标准行为且不保证异常安全性,因此 pos 的无效索引值以及失败的内存分配可能会导致引发异常 [SWS_CORE_03026]。 问题 Q-7ea120ac992dc5ac (未决)

相互作用与相关要求

在 ara::core::BasicString 内部,此构造函数补充了带有附加长度限制的变体 n [SWS_CORE_03027] 以及针对指针、迭代器和初始化列表的重载 [SWS_CORE_03028]、[SWS_CORE_03031]、[SWS_CORE_03032]。与不带源字符串的构造函数(这些构造函数被声明为有条件异常安全 [SWS_CORE_03024] 或 noexcept [SWS_CORE_03025])不同,动态接纳子字符串需要特别注意可能发生的分配错误。此外,BasicString 在其他模块组件(如 Bitset [SWS_CORE_01749])中用作参数基础。

本文由 AI 创建,完全基于 AUTOSAR 版本 R25-11 的规范数据。

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

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

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

函数 Basic [SWS_CORE_03027]

BasicString (const BasicString &str, size_type pos, size_type n, const Allocator &a=Allocator());

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString 的构造函数 [SWS_CORE_03027] 用于同步创建新字符串,作为来自源字符串 str 的子序列。从索引 pos 开始最多采用 n 个字符。通过可选参数 a 可以传递自定义分配器,否则默认创建标准分配器实例。该定义通过头文件 #include "ara/core/string.h" 提供。

关于健壮性,该函数被声明为 not exception safe([SWS_CORE_03027])。根据 [basic.string] 的规范,如果 pos 超过源字符串的长度或新缓冲区的分配失败,该构造函数可能会失败。 问题 Q-31041ea019720daf (未决)这与标准构造函数和分配器构造函数(如 [SWS_CORE_03024] 和 [SWS_CORE_03025])形成对比,后者被指定为条件异常安全或明确指定为 noexcept。

在 ara::core::BasicString 内部的配合中,该函数补充了替代重载:虽然 [SWS_CORE_03026] 复制从 pos 开始直到字符串结尾的子字符串,但 [SWS_CORE_03027] 允许显式的长度限制。创建的其他替代方案提供了基于迭代器([SWS_CORE_03031])或基于指针的初始化([SWS_CORE_03028])。此外,带有 pos 和 n 的相同子字符串模式也在相关类(如 [SWS_CORE_01749] 中的 Bitset)中使用。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03027
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03027@rel:R25-11#8e813d41
Content hash
8e813d41
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03027
Status: valid/unmigrated Version: rel:R25-11#596b1658 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_03027@rel:R25-11#596b1658
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

函数 Basic [SWS_CORE_03028]

BasicString (const value_type *s, size_type n, const Allocator &a=Allocator());

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

来自头文件 ara/core/string.h 的类 ara::core::BasicString 的构造函数从指向字符数组的指针 s 和显式长度规格 n 同步创建字符串 [SWS_CORE_03028]。通过参数 a 可以可选传递自定义分配器,该分配器默认回退到 Allocator() [SWS_CORE_03028]。其语义符合 [basic.string] 中的规定,不同之处在于参数类型 charT 被替换为 value_type [SWS_CORE_03028]。

在规范中,该函数被标明为非异常安全(not exception safe)[SWS_CORE_03028]。这使其区别于异常安全初始化(如分配器构造函数 [SWS_CORE_03025])或条件异常安全默认构造函数 [SWS_CORE_03024]。未规定特定的错误代码、返回值或向 DEM 或 DET 发送诊断消息。作为一个重要的前置条件,调用者大概需要确保 s 指向至少包含 n 个连续有效元素的内存区域(Interpretation),以排除未定义行为。 问题 Q-957a57c885a2e702 (未决)

在类 ara::core::BasicString 内,该重载补充了针对以空字符结尾的字符串的不带长度规格的构造 [SWS_CORE_03029],以及用于相同字符序列 [SWS_CORE_03030] 或子字符串 [SWS_CORE_03027] 的构造函数。创建之后,可以通过赋值和拼接运算符修改对象 [SWS_CORE_03072]。此外,生成的字符串还可用作相关数据类型接口的输入,例如用于初始化 Bitset [SWS_CORE_01749]。

本文由 AI 创建,完全基于版本 R25-11 的规范。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03028
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03028@rel:R25-11#14d5c3f5
Content hash
14d5c3f5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03028
Status: valid/unmigrated Version: rel:R25-11#57c33e8e 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_03028@rel:R25-11#57c33e8e
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

函数 Basic [SWS_CORE_03029]

BasicString (const value_type *s, const Allocator &a=Allocator());

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

构造函数 [SWS_CORE_03029] 从类型为 const value_type* 的以 null 结尾的字符串指针和可选分配器初始化 ara::core::BasicString 的实例。其语义遵循 [basic.string] 的标准定义,其中 charT 被 value_type 替换 [SWS_CORE_03029]。头文件为 #include "ara/core/string.h" [SWS_CORE_03029]。

在错误行为和异常安全性方面,该函数被明确指定为 not exception safe [SWS_CORE_03029]。如果在构造期间发生内存分配或错误,则不保证任何异常保证。与此相反,标准构造函数如 [SWS_CORE_03025] 被归类为 noexcept 且 exception safe,或 [SWS_CORE_03024] 被归类为有条件异常安全(conditionally exception safe)。

该规范定义了 BasicString 构造函数族内部的交互关系:

调用方必须确保指针 s 有效且按规范以 null 结尾(解释:因为未指定长度时,根据标准行为使用终止符来确定长度)。 问题 Q-7e0172674e115dea (未决)由于该构造函数是同步执行的,因此在安全关键型上下文中应考虑到可能会通过分配器获取动态内存。

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

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

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

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

函数 Basic [SWS_CORE_03030]

BasicString (size_type n, value_type c, const Allocator &a=Allocator());

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

使用

类 ara::core::BasicString(在头文件 ara/core/string.h 中定义)的构造函数 [SWS_CORE_03030] 同步创建由类型为 value_type 的字符 c 的 n 个副本组成的字符串。功能行为遵循 C++ 标准规范 [basic.string],偏差在于 charT 被替换为 value_type。可选地,可以传递自定义分配器 a,默认情况下实例化 Allocator()。

错误处理与异常安全性

规范将此构造函数归类为 not exception safe,从而使其区别于诸如 [SWS_CORE_03025] 等有保证的 noexcept 构造函数或条件安全的默认构造函数 [SWS_CORE_03024]。解释:缺乏异常安全性推测主要是由于为 n 个字符进行动态内存分配失败所致。 问题 Q-87ae8b5cae690fdb (未决)未为此调用指定特定的 AUTOSAR 错误代码或向 DET 或 DEM 发送的报告。

并发性与交互

在没有外部同步的情况下,多个线程对同一实例的并发访问不是线程安全的。创建后,可以通过用于单个字符([SWS_CORE_03074])或字符串([SWS_CORE_03072])的连接运算符(如 operator+=)来修改该字符串。此外,创建的字符串还可用于根据 [SWS_CORE_01749] 初始化 ara::core::Bitset。对于替代创建方式,提供了通过指针([SWS_CORE_03028]、[SWS_CORE_03029])或初始化列表([SWS_CORE_03032])的构造函数。

此文本由 AI 生成,仅供参考。具有约束力的是 AUTOSAR 规范。

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

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

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

函数 Basic [SWS_CORE_03031]

template <class InputIterator> BasicString (InputIterator begin, InputIterator end, const Allocator &a=Allocator());

As per corresponding usage in [basic.string]

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

使用

该模板函数代表头文件 <ara/core/string.h> 中类 ara::core::BasicString 的范围构造函数 [SWS_CORE_03031]。它用于从由类型为 InputIterator 的输入迭代器 begin 和 end 所定义的序列中同步初始化字符串 [SWS_CORE_03031]。可选地,可以通过参数 a 传递自定义分配器实例;如果未提供此参数,则创建默认实例 Allocator() [SWS_CORE_03031]。在此过程中,功能语义遵循 C++ 标准对 [basic.string] 的规定 [SWS_CORE_03031]。

错误处理与异常安全性

该规范明确将该函数声明为 not exception safe [SWS_CORE_03031]。不会发出任何 AUTOSAR 特定的 DET 或 DEM 消息,因为其行为与 C++ 标准库的行为一致 [SWS_CORE_03031]。解释:缺少异常安全性可能是由于分配器可能发生的内存分配失败,或者所传递迭代器的操作失败所致。 问题 Q-676411ee17d37217 (未决)

并发性与限制

调用在调用线程的上下文中同步进行。与默认构造函数 [SWS_CORE_03024] 或纯分配器构造函数 [SWS_CORE_03025] 不同,该构造函数未声明为 noexcept。因此,调用方必须确保范围 [begin, end) 有效且所引用的元素可以无误读取。

相互作用

该函数对 ara::core::BasicString 的替代构造函数进行了补充,其中包括子字符串重载 [SWS_CORE_03026]、字符数组重载 [SWS_CORE_03028] 和初始化列表重载 [SWS_CORE_03032],它们具有相同的异常分类。构造完成后,该实例可以通过拼接运算符(如 operator+=)进行修改 [SWS_CORE_03072],或者用于初始化依赖类型(如 Bitset)[SWS_CORE_01749]。

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

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

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

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

函数 Basic [SWS_CORE_03032]

BasicString (std::initializer_list< value_type >, const Allocator &=Allocator());

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

构造函数 BasicString 用于根据初始化列表同步初始化 ara::core::BasicString 的实例([SWS_CORE_03032])。声明通过类 ara::core::BasicString 作用域内的头文件 #include "ara/core/string.h" 进行([SWS_CORE_03032])。其行为遵循 [basic.string] 中的定义,其中符合标准地将 charT 替换为 value_type([SWS_CORE_03032])。参数传入一个 std::initializer_list<value_type> 以及可选的分配器([SWS_CORE_03032])。

在错误处理和异常处理方面,该构造函数被指定为 not exception safe([SWS_CORE_03032])。这使其区别于被声明为异常安全或 noexcept 的默认构造函数([SWS_CORE_03024])或显式分配器构造函数([SWS_CORE_03025])。未为此构造函数定义特定的 AUTOSAR 错误码、DET 或 DEM 消息。解释:在内存不足时,对象创建可能会失败,因为必须为初始化列表的元素分配动态内存。 问题 Q-7ecc7431c1c2f54c (未决)

在与模块 core 的协作中,该函数补充了替代构造途径,例如从子字符串([SWS_CORE_03026]、[SWS_CORE_03027])、指针([SWS_CORE_03028]、[SWS_CORE_03029])或迭代器([SWS_CORE_03031])创建。对于随后通过初始化列表扩展现有字符串的情况,提供了相应的 operator+=([SWS_CORE_03075])。此外,创建的 BasicString 实例可用于初始化相关数据类型,例如 Bitset([SWS_CORE_01749])。

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

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

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

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

函数 Basic [SWS_CORE_03033]

BasicString (const BasicString &, const Allocator &);

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString 的复制构造函数 [SWS_CORE_03033] 用于通过显式传递分配器来同步创建作为现有实例副本的新字符串。函数声明 BasicString (const BasicString &, const Allocator &); 通过头文件 #include "ara/core/string.h" 提供 [SWS_CORE_03033]。功能语义遵循标准模式 [basic.string] 中的相应使用 [SWS_CORE_03033]。

在错误处理方面,构造函数在规范中被明确归类为 not exception safe [SWS_CORE_03033]。此调用不存在特定的 AUTOSAR 错误代码或对 DET 或 DEM 等诊断模块的通知;因此,分配器在动态内存分配中的异常应当遵循 [basic.string] 的通用行为。 问题 Q-496b847c39fc25ae (未决)

关于并发性和边界条件,通过 const BasicString & 传递源实例要求在复制过程中不可同时修改源对象。允许来自多个线程的并发读访问,而未保护的并行写访问推测会导致数据不一致。 问题 Q-daa5ef2c4672b657 (未决)

在与相关规范元素的交互中,该构造函数除了带分配器的移动构造函数 [SWS_CORE_03034]、默认构造函数 [SWS_CORE_03024] 或分配器构造函数 [SWS_CORE_03025] 等替代初始化路径外可供使用。创建的对象可以通过诸如 operator+= 等运算符无缝修改 [SWS_CORE_03072],或用于初始化诸如 Bitset 等依赖类型 [SWS_CORE_01749]。

本文本由 AI 系统生成,作为 AUTOSAR 规范的使用说明。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03033
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03033@rel:R25-11#925c493c
Content hash
925c493c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03033
Status: valid/unmigrated Version: rel:R25-11#6cb3251d 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_03033@rel:R25-11#6cb3251d
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

函数 Basic [SWS_CORE_03034]

BasicString (BasicString &&, const Allocator &);

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString 的移动构造函数 [SWS_CORE_03034] 通过头文件 #include "ara/core/string.h" 提供。它通过接管现有实例的数据并绑定到显式指定的分配器来同步创建新字符串。语义行为和要求符合 [basic.string] 中的 ISO C++ 标准规定。

在调用上下文中,该函数需要两个参数:对源对象的右值引用(BasicString&&)以及分配器实例(const Allocator&)。源对象在移动操作后保持在有效但已修改的状态。关于错误处理,该函数在 [SWS_CORE_03034] 中被归类为 not exception safe。解释:这推测是因为在分配器不同或不兼容时必须分配新内存并复制元素,这在内存不足时可能会失败。 问题 Q-2a89ad749ae1b2f6 (未决)这使得该构造函数区别于诸如 [SWS_CORE_03025] 等严格异常安全的重载或诸如 [SWS_CORE_03024] 等条件异常安全的变体。

在 core 内部的相互协作中,该签名补充了除带分配器的复制构造函数 [SWS_CORE_03033] 和子字符串初始化器(如 [SWS_CORE_03026])之外的创建方法范围。在成功实例化之后,可以对字符串进行修改,例如通过 operator+=([SWS_CORE_03072]、[SWS_CORE_03307])追加内容,或者根据 [SWS_CORE_01749] 用作依赖数据类型(如 Bitset)的输入。

本段文本由人工智能基于 AUTOSAR R25-11 规范生成。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03034
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03034@rel:R25-11#80f645a0
Content hash
80f645a0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03034
Status: valid/unmigrated Version: rel:R25-11#27dac459 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_03034@rel:R25-11#27dac459
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

函数 BasicString [SWS_CORE_03020] Upstream: RS_AP_00145

BasicString (const BasicString &str);

As per corresponding usage in [basic.string]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03020
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03020@rel:R25-11#03febcf4
Content hash
03febcf4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03020
Status: valid/unmigrated Version: rel:R25-11#853f7549 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_03020@rel:R25-11#853f7549
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

函数 BasicString [SWS_CORE_03022] Upstream: RS_AP_00145

BasicString (BasicString &&str) noexcept=default;

As per corresponding usage in [basic.string]

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

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

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

函数 BasicString [SWS_CORE_03302]

explicit BasicString (StringView sv, const Allocator &a=Allocator());

As per corresponding usage in [basic.string]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03302
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03302@rel:R25-11#697bc34a
Content hash
697bc34a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03302
Status: valid/unmigrated Version: rel:R25-11#334f5de6 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03302@rel:R25-11#334f5de6
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#468764db2026-09-30
  • R19-11rel:R19-11#30ce8b8b2026-10-14
  • R20-11rel:R20-11#f4ee1ffd2026-10-14
  • R21-11rel:R21-11#ae5cbb962026-10-14
  • R22-11rel:R22-11#069325742026-10-14
  • R23-11rel:R23-11#a044a23b2026-10-14
  • R24-11rel:R24-11#2941a9da2026-10-14
  • R25-11rel:R25-11#334f5de62026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 BasicString [SWS_CORE_03303]

template <class T> BasicString (const T &t, size_type pos, size_type n, const Allocator &a=Allocator());

As per corresponding usage in [basic.string]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03303
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03303@rel:R25-11#d30e19bd
Content hash
d30e19bd
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03303
Status: valid/unmigrated Version: rel:R25-11#929f742b Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03303@rel:R25-11#929f742b
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#53fb08b22026-09-30
  • R19-11rel:R19-11#c03174142026-10-14
  • R20-11rel:R20-11#0a951e942026-10-14
  • R21-11rel:R21-11#b257a9022026-10-14
  • R22-11rel:R22-11#a7755b0d2026-10-14
  • R23-11rel:R23-11#9e566e1c2026-10-14
  • R24-11rel:R24-11#71521ca52026-10-14
  • R25-11rel:R25-11#929f742b2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 append [SWS_CORE_03076]

BasicString & append (const BasicString &str);

As per corresponding usage in [basic.string]

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

用法与语义

来自头文件 #include "ara/core/string.h" 的类 ara::core::BasicString([SWS_CORE_03076])的成员函数 append 用于将类型为 BasicString 的完整字符串对象 str 同步追加到调用实例。其语义遵循 [basic.string] 下标准化的 C++ 定义;作为返回值,该函数返回对已修改对象(*this)的引用([SWS_CORE_03076])。

错误处理与边界条件

关于异常安全性,该操作被明确归类为 not exception safe([SWS_CORE_03076])。Interpretation:如果在执行期间发生错误(例如内存不足),由于未规范恢复保证,字符串的状态可能是不确定的。 问题 Q-57504af4ee633d0b (未决)与带有位置索引的变体如 [SWS_CORE_03077] 或 [SWS_CORE_03309](触发 IsoStdOutOfRangeViolation)或缓冲区大小检查如 [SWS_CORE_03078](触发 IsoStdLengthErrorViolation)不同,[SWS_CORE_03076] 未定义单独的 Violation。

相互作用与重载

该函数是 ara::core::BasicString 内部重载族的一部分:

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

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

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

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

函数 append [SWS_CORE_03077]

BasicString & append (const BasicString &str, size_type pos, size_type n=npos);

As per corresponding usage in [basic.string] except for the following deviations: 1. if (pos > str.size()) IsoStdOutOfRangeViolation is raised instead of std:: out_of_range

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

类 ara::core::BasicString 的成员函数 append([SWS_CORE_03077],声明于 #include "ara/core/string.h")将另一个 BasicString 实例 str 的子字符串同步追加到当前对象。参数 pos 和 n(默认为 npos)确定 str 内的起始索引和最大字符数。返回值是修改后的目标对象(*this)的引用。

在语义和接口行为方面,该函数遵循 C++ 标准中 [basic.string] 的定义,但在错误处理上有所偏差:当 pos > str.size() 成立时,根据 [SWS_CORE_03077] 触发 IsoStdOutOfRangeViolation(类似于 std::out_of_range)。规范明确将该操作归类为 not exception safe,因此在出错时无法保证对象状态保持不变或一致。

由于缺乏文档记录的同步机制,在同一实例上的并发调用应当不是线程安全的。 问题 Q-ec3b029fca94ad8a (未决)针对备选数据源,模块中提供了更多重载:完整字符串([SWS_CORE_03076])、缓冲区和指针([SWS_CORE_03078]、[SWS_CORE_03079])、字符重复([SWS_CORE_03080])、迭代器对([SWS_CORE_03081])、初始化列表([SWS_CORE_03082])以及 StringView 对象([SWS_CORE_03308]、[SWS_CORE_03309])。

本文字由 AI 生成,并基于 AUTOSAR R25-11 规范状态。

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception 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_03077
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03077@rel:R25-11#d3a37efb
Content hash
d3a37efb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03077
Status: valid/unmigrated Version: rel:R25-11#85b9ca52 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_03077@rel:R25-11#85b9ca52
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

函数 append [SWS_CORE_03078]

BasicString & append (const value_type *s, size_type n);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type 2. if ( size() > n + max_size() ) IsoStdLengthErrorViolation is raised instead of std::length_error

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

类 ara::core::BasicString([SWS_CORE_03078])的成员函数 append 将传入的类型为 const value_type* 的字符数组 s 的前 n 个字符同步追加到现有字符串中。作为返回值,该函数返回对修改后实例的引用(BasicString&),从而允许链接后续调用。该声明可通过头文件 #include "ara/core/string.h" 获取。

其功能行为遵循 [basic.string] 对 std::basic_string::append 的规范,但具有特定的 AUTOSAR 差异([SWS_CORE_03078]):

  • 模板参数 charT 被替换为类型 value_type。
  • 如果生成的长度超过容量限制(条件 size() > n + max_size()),将触发违规 IsoStdLengthErrorViolation 而非 std::length_error。

关于执行安全性,该操作被明确规范为 not exception safe([SWS_CORE_03078])。如果在内存分配或复制期间发生错误或违规,该对象不保证一致的中间状态。

该方法补充了 ara::core::BasicString 内 append 的其他重载。其中包括追加完整实例([SWS_CORE_03076])、通过 IsoStdOutOfRangeViolation 进行范围检查的子字符串([SWS_CORE_03077])、以空字符结尾的字符串([SWS_CORE_03079])、相同字符序列([SWS_CORE_03080])、迭代器范围([SWS_CORE_03081])、初始化列表([SWS_CORE_03082])以及 StringView 对象([SWS_CORE_03308]、[SWS_CORE_03309])。

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

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception safe
Verletzungen (Violations)IsoStdLengthEr- Description as per std::length_error rorViolation

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

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

函数 append [SWS_CORE_03079]

BasicString & append (const value_type *s);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

类 ara::core::BasicString([SWS_CORE_03079])的成员函数 append 将指针类型为 const value_type* 的以空字符结尾的字符串追加到现有字符串中。其语义符合 C++ 标准 [basic.string] 的行为,其中 charT 被替换为 value_type。作为返回值,该同步函数返回对调用对象的引用(BasicString&),从而允许链式调用连续操作。

在错误处理和异常安全性方面,该操作明确归类为 not exception safe([SWS_CORE_03079])。与在超出最大长度时触发 IsoStdLengthErrorViolation 的带长度指定的重载 [SWS_CORE_03078] 或带有 IsoStdOutOfRangeViolation 的子字符串重载(如 [SWS_CORE_03077])不同,此变体未定义特定的违规类。确保传入的指针 s 指向有效的以空字符结尾的字符序列,应当属于调用者的职责。 问题 Q-4e959f75f98977eb (未决)

该函数属于 ara::core::BasicString 中用于追加数据的一组重载函数族:

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

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

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

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

函数 append [SWS_CORE_03080]

BasicString & append (size_type n, value_type c);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

ara::core::BasicString([SWS_CORE_03080])的成员函数 append 将指定数量 n 的类型为 value_type 的字符(参数 c)同步追加到现有字符串中。它由头文件 ara/core/string.h 提供,并返回修改后实例的引用(*this),从而实现链式调用。

功能行为遵循 C++ 标准对 [basic.string] 的定义,其中 charT 被替换为 value_type([SWS_CORE_03080])。关于异常安全性,该函数明确归类为 not exception safe([SWS_CORE_03080])。与其他重载(如 [SWS_CORE_03077] 或 [SWS_CORE_03078])不同,未为此变体定义特定的运行时违规(Violations),如 IsoStdOutOfRangeViolation 或 IsoStdLengthErrorViolation。在出错时,该方法推测不保证实例状态保持不变。 问题 Q-15af6c12a1a342a9 (未决)

在并发和线程安全的语境下需要注意,对 BasicString 的同一实例的同时写入访问推测必须进行外部同步。 问题 Q-1e8a1511516e4cd8 (未决)该函数补充了 ara::core::BasicString 中 append 的其他重载,这些重载涵盖了追加完整字符串([SWS_CORE_03076])、局部范围([SWS_CORE_03077])、指针缓冲区([SWS_CORE_03078]、[SWS_CORE_03079])、迭代器范围([SWS_CORE_03081])、初始化列表([SWS_CORE_03082])或 StringView 对象([SWS_CORE_03308]、[SWS_CORE_03309])。

该文本由 AI 生成,用作参考指引。

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

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

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

函数 append [SWS_CORE_03081]

template <class InputIterator> BasicString & append (InputIterator first, InputIterator last);

As per corresponding usage in [basic.string]

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

用法与语义

类 ara::core::BasicString 的模板成员函数 append 通过头文件 ara/core/string.h 提供 [SWS_CORE_03081]。它将由类别为 InputIterator 的迭代器对 first 和 last 限定的字符序列同步追加到现有字符串 [SWS_CORE_03081]。其功能行为遵循 C++ 标准 [basic.string] 中的相应定义 [SWS_CORE_03081]。作为返回值,该操作返回修改后的 BasicString 对象(*this)的引用 [SWS_CORE_03081]。

错误处理与异常安全性

对于该函数,异常安全性明确规定为 not exception safe [SWS_CORE_03081]。在发生错误时——例如在缓冲区扩容期间动态内存耗尽——按解释该实例可能会保持在无效状态。 问题 Q-600c7dacc868877c (未决)与方法 [SWS_CORE_03077]、[SWS_CORE_03078] 的其他重载不同,未为此迭代器重载定义特定的 AUTOSAR Violations(如 IsoStdOutOfRangeViolation 或 IsoStdLengthErrorViolation)。

模块内的相互作用

该函数属于向 ara::core::BasicString 追加数据的大量重载函数组:

其中,迭代器变体 [SWS_CORE_03081] 为集成任意通用数据源提供了最大的灵活性。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03081
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03081@rel:R25-11#1402cae8
Content hash
1402cae8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03081
Status: valid/unmigrated Version: rel:R25-11#32de7cce 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_03081@rel:R25-11#32de7cce
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

函数 append [SWS_CORE_03082]

BasicString & append (std::initializer_list< value_type >);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

类 ara::core::BasicString 的成员函数 append 将类型为 std::initializer_list<value_type> 的初始化列表中的字符同步追加到现有字符串对象 [SWS_CORE_03082]。其行为遵循 C++ 标准中 [basic.string] 的语义,区别在于 charT 被替换为 value_type [SWS_CORE_03082]。该调用直接修改实例并返回对象的引用,从而实现方法链式调用。

在错误处理方面,该函数被归类为非异常安全(not exception safe)[SWS_CORE_03082]。与相关重载(如 [SWS_CORE_03077] 或 [SWS_CORE_03078])不同,此变体未定义特定违规(如 IsoStdOutOfRangeViolation 或 IsoStdLengthErrorViolation)。解释:如果内部内存分配失败,该对象推测会保持在未定义状态。 问题 Q-169750518dc1904b (未决)由于内部状态被修改,未进行外部同步的并发调用应当会导致数据竞争。

在 ara::core::BasicString 内部的相互作用中,该函数是相关 append 操作组的一部分。它补充了针对完整字符串([SWS_CORE_03076])、局部范围([SWS_CORE_03077])、字符串指针([SWS_CORE_03078]、[SWS_CORE_03079])、重复单字符([SWS_CORE_03080])、迭代器范围([SWS_CORE_03081])和 StringView 实例([SWS_CORE_03308]、[SWS_CORE_03309])的重载。

本文字由 AI 生成,用作 AUTOSAR 环境中的参考指南。

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

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

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

函数 append [SWS_CORE_03308]

BasicString & append (StringView sv);

As per corresponding usage in [basic.string]

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

使用

类 ara::core::BasicString 的同步成员函数 append 将传入字符串视图(StringView sv)的字符追加到现有字符串中 [SWS_CORE_03308]。该接口通过头文件 #include "ara/core/string.h" 引入 [SWS_CORE_03308]。它返回对调用实例(BasicString &)的引用,从而可以链式执行多次修改 [SWS_CORE_03308]。其功能语义遵循 C++ 中的相应规范 [basic.string] [SWS_CORE_03308]。

错误处理与异常安全性

该函数在 AUTOSAR 中被明确规范为非异常安全(“not exception safe”)[SWS_CORE_03308]。该调用未定义特定的错误代码、DET 或 DEM 消息以及显式 AUTOSAR 违规,而相关重载如 [SWS_CORE_03077] 或 [SWS_CORE_03309] 在索引越界时触发 IsoStdOutOfRangeViolation,[SWS_CORE_03078] 在长度越界时触发 IsoStdLengthErrorViolation。

并发性与交互

由于 append 直接修改被调用字符串对象的状态,因此在没有外部同步的情况下,多个线程对同一实例的并发访问大概不是线程安全的。 问题 Q-814665e285846c8e (未决)该方法与 ara::core::BasicString 的其他 append 变体结合使用,这些变体允许追加完整的 BasicString 实例 [SWS_CORE_03076]、C 字符串 [SWS_CORE_03079]、重复的单个字符 [SWS_CORE_03080] 以及迭代器范围 [SWS_CORE_03081] 或初始化列表 [SWS_CORE_03082]。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03308
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03308@rel:R25-11#f41fe4cf
Content hash
f41fe4cf
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03308
Status: valid/unmigrated Version: rel:R25-11#eff6b5dc Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03308@rel:R25-11#eff6b5dc
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#ca95ba262026-09-30
  • R19-11rel:R19-11#8aab77bd2026-10-14
  • R20-11rel:R20-11#6800f5c02026-10-14
  • R21-11rel:R21-11#ad4c498c2026-10-14
  • R22-11rel:R22-11#498bea932026-10-14
  • R23-11rel:R23-11#bc8b2a142026-10-14
  • R24-11rel:R24-11#6f0af72f2026-10-14
  • R25-11rel:R25-11#eff6b5dc2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 append [SWS_CORE_03309]

template <class T> BasicString & append (const T &t, size_type pos, size_type n=npos);

As per corresponding usage in [basic.string] except for the following deviations: 1. if (pos > sv.size()) IsoStdOutOfRangeViolation is raised instead of std:: out_of_range

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

使用

头文件 #include "ara/core/string.h" 中类 ara::core::BasicString([SWS_CORE_03309])的模板函数 append 用于将对象 t 的局部范围同步追加到调用的字符串中。其行为基于 ISO C++ 规范 [basic.string]。参数 pos 确定源对象中的起始索引,而 n 确定要追加的最大字符数(默认值为 npos)。作为返回值,提供修改后的字符串对象(*this)的引用。解释:传入的对象 t 推测在内部被解释为字符串视图 sv。 问题 Q-9752a5eeaf05b684 (未决)

错误处理

AUTOSAR 为该函数定义了与 C++ 标准的特定偏差:如果指定的位置大于源范围的大小(pos > sv.size()),则会触发 IsoStdOutOfRangeViolation 而不是 std::out_of_range([SWS_CORE_03309])。该违规的语义描述与 std::out_of_range 相同。

限制与异常安全性

该操作在规范中明确归类为 not exception safe([SWS_CORE_03309])。因此,在发生错误时,不保证稳定保留先前的状态。

相互作用

该函数补充了 ara::core::BasicString 中用于扩展字符串的其他变体。其中包括针对完整 BasicString 实例([SWS_CORE_03076])或其局部范围([SWS_CORE_03077])、带长度指定的 C 字符串([SWS_CORE_03078])或以空字符结尾的指针([SWS_CORE_03079])、字符重复([SWS_CORE_03080])、迭代器范围([SWS_CORE_03081])、初始化列表([SWS_CORE_03082])以及独立 StringView 对象([SWS_CORE_03308])的重载。

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

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception 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_03309
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03309@rel:R25-11#816810db
Content hash
816810db
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03309
Status: valid/unmigrated Version: rel:R25-11#34725e40 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03309@rel:R25-11#34725e40
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#c88e788b2026-09-30
  • R19-11rel:R19-11#a14295422026-10-14
  • R20-11rel:R20-11#f70df1b22026-10-14
  • R21-11rel:R21-11#158fe1c42026-10-14
  • R22-11rel:R22-11#acaa045d2026-10-14
  • R23-11rel:R23-11#66e754de2026-10-14
  • R24-11rel:R24-11#6916df192026-10-14
  • R25-11rel:R25-11#34725e402026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 assign [SWS_CORE_03084]

BasicString & assign (const BasicString &str);

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString 的成员函数 assign 用于根据 [basic.string] [SWS_CORE_03084] 的行为将现有字符串的内容同步赋值给调用实例。该函数通过头文件 ara/core/string.h 提供,并接受对 BasicString 对象(const BasicString &str)的常量引用。作为返回值,它返回对修改后的目标对象(*this)的引用,从而允许方法链式调用 [SWS_CORE_03084]。

关于健壮性,该函数被明确规范为 not exception safe [SWS_CORE_03084]。在复制过程中的动态内存分配期间可能会发生未被异常保证捕获的错误;在出错情况下,实例大概会保持在未定义状态。 问题 Q-0ddd5ac03e56490f (未决)此赋值函数未提供特定的 AUTOSAR 错误代码或向 DET 或 DEM 发送的消息。

在与其他接口的相互作用中,assign 代表赋值函数族中的复制变体。虽然移动重载 [SWS_CORE_03085] 被声明为 conditionally exception safe,但其余赋值(例如通过子字符串 [SWS_CORE_03086]、字符串视图 [SWS_CORE_03087] 或迭代器范围 [SWS_CORE_03091])均具有 not exception safe 特性。由于未规范线程安全性,在没有外部同步的情况下对同一实例的并发调用大概是非可重入且数据不安全的。 问题 Q-37d67c851a296f55 (未决)

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

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

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

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

函数 assign [SWS_CORE_03085]

BasicString & assign (BasicString &&str) noexcept(std::allocator_ traits< Allocator >::propagate_on_container_move_ assignment::value||std::allocator_traits< Allocator >::is_always_ equal::value);

As per corresponding usage in [basic.string]

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

根据 [SWS_CORE_03085] 的成员函数 assign 的移动重载将右值引用 str 的内容同步赋值给 ara::core::BasicString 的现有实例(声明于头文件 ara/core/string.h 中)。该函数返回对调用对象(*this)的引用。其功能行为遵循 C++ 标准中 [basic.string] 的相应定义。

关于错误和异常处理,该方法声明为有条件异常安全(conditionally exception safe)[SWS_CORE_03085]。根据 noexcept,当且仅当分配器传播移动赋值(propagate_on_container_move_assignment::value)或分配器实例始终相等(is_always_equal::value)时,才排除抛出异常。与在超出范围或长度时触发特定违规(如 IsoStdOutOfRangeViolation 或 IsoStdLengthErrorViolation)且被视为非异常安全的其他赋值函数(如 [SWS_CORE_03086] 或 [SWS_CORE_03088])不同,此操作未定义单独的 AUTOSAR Violations。

在与 BasicString::assign 的备选重载相互作用时——例如根据 [SWS_CORE_03084] 的常量左值引用、通过 [SWS_CORE_03087] 的视图或根据 [SWS_CORE_03089] 的字符串缓冲区——右值变体允许进行资源高效的赋值而无需重新分配内存。解释:传递之后,源对象 str 推测会保持在有效但未指定的状态,这对于符合 [basic.string] 的移动操作是常见的。 问题 Q-88c8157963cdd7e0 (未决)

此文本由 AI 生成,用作参考指引。引用的 AUTOSAR 规范具有权威性。

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitconditionally exception safe

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

Record
AUTOSAR/AP/record/SWS_CORE_03085
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03085@rel:R25-11#2465eee7
Content hash
2465eee7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03085
Status: valid/unmigrated Version: rel:R25-11#9d482d91 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_03085@rel:R25-11#9d482d91
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

函数 assign [SWS_CORE_03086]

BasicString & assign (const BasicString &str, size_type pos, size_type n=npos);

As per corresponding usage in [basic.string] except for the following deviations: 1. if (pos > str.size()) IsoStdOutOfRangeViolation is raised instead of std:: out_of_range

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

通过头文件 ara/core/string.h 提供的类 ara::core::BasicString([SWS_CORE_03086])的成员函数 assign 将传入源字符串 str 的子范围同步赋值给当前实例。除源引用 str 外,该调用还接受起始索引 pos 以及可选的字符数 n(其默认定义为 npos)。赋值后,返回对已更改对象(*this)的引用。其功能语义原则上符合 [basic.string]([SWS_CORE_03086])的规定。

在错误处理方面,与 ISO C++ 标准存在明确差异:如果条件 pos > str.size() 成立,则不会触发 std::out_of_range,而是引起 IsoStdOutOfRangeViolation([SWS_CORE_03086])。此外,该函数在规范中被明确归类为非异常安全(not exception safe)([SWS_CORE_03086])。

在 ara::core::BasicString 的赋值方法组合中,此子字符串重载补充了完整字符串的赋值([SWS_CORE_03084])、条件异常安全的移动赋值([SWS_CORE_03085])、来自 StringView 的赋值([SWS_CORE_03087])以及使用字符缓冲区([SWS_CORE_03088])或迭代器范围([SWS_CORE_03091])的操作。

本文由 AI 生成,不替代任何官方规范。

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception 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_03086
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03086@rel:R25-11#12222506
Content hash
12222506
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03086
Status: valid/unmigrated Version: rel:R25-11#5c0799de 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_03086@rel:R25-11#5c0799de
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

函数 assign [SWS_CORE_03087]

BasicString & assign (StringView sv);

As per corresponding usage in [basic.string]

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

使用

用于 StringView([SWS_CORE_03087])的成员函数 assign 通过传入的字符串视图中的字符同步替换 ara::core::BasicString 实例的内容。其语义遵循 C++ 标准库中 [basic.string] 的相应定义。作为返回值,该函数返回对修改后的目标对象(BasicString &)的引用,从而允许链式调用连续的方法。该声明通过头文件 #include "ara/core/string.h" 提供。

错误处理与异常安全性

该函数在规范中被标明为 not exception safe([SWS_CORE_03087])。Interpretation:如果赋值需要扩充内部缓冲区容量且该内存分配失败,则可能会抛出异常,而无法保证实例的状态保持不变。 问题 (未决)

并发性与限制

Interpretation:对 ara::core::BasicString 的同一实例调用 assign 不是线程安全的,在多个线程同时进行读或写访问时需要外部同步。 问题 Q-12774d6cd363b032 (未决)

相互作用

该函数通过类型安全的视图扩展了 ara::core::BasicString 的赋值范围。它与复制和移动赋值([SWS_CORE_03084]、[SWS_CORE_03085])、子字符串([SWS_CORE_03086])、指向字符数据的指针([SWS_CORE_03088]、[SWS_CORE_03089])、字符重复([SWS_CORE_03090])、迭代器范围([SWS_CORE_03091])以及初始化列表([SWS_CORE_03092])的重载并存。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03087
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03087@rel:R25-11#6df02dec
Content hash
6df02dec
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03087
Status: valid/unmigrated Version: rel:R25-11#30a459e9 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_03087@rel:R25-11#30a459e9
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

函数 assign [SWS_CORE_03088]

BasicString & assign (const value_type *s, size_type n);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type 2. if ( n > max_size() ) IsoStdLengthErrorViolation is raised instead of std:: length_error

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

使用

类 ara::core::BasicString 的成员函数 assign 将传入的类型为 const value_type* 的字符数组 s 中的前 n 个字符同步赋值给当前字符串实例,并返回对修改后对象(*this)的引用 [SWS_CORE_03088]。其功能行为原则上符合 [basic.string] 的定义,其中 AUTOSAR 将泛型参数类型 charT 替换为 value_type [SWS_CORE_03088]。

错误处理与边界条件

该赋值被规范为非异常安全(not exception safe)[SWS_CORE_03088]。如果指定的长度 n 超过最大可表示大小 max_size()(n > max_size()),该函数将触发 AUTOSAR 违规 IsoStdLengthErrorViolation 而非 std::length_error [SWS_CORE_03088]。Interpretation:调用者应确保 s 指向至少 n 个有效字符,因为规范未定义单独的缓冲区检查。 问题 Q-290c36db79f27a0a (未决)

相互作用

该函数主要适用于非空字符结尾的缓冲区或数组子范围。它补充了隐式确定长度的重载 assign(const value_type* s) [SWS_CORE_03089]。在 ara::core::BasicString 的类体系中,还存在其他赋值重载:通过复制 [SWS_CORE_03084] 或移动 [SWS_CORE_03085] 接收现有字符串、带索引检查的子字符串赋值 [SWS_CORE_03086]、从 StringView [SWS_CORE_03087] 接收,以及用于字符重复 [SWS_CORE_03090]、迭代器范围 [SWS_CORE_03091] 和初始化列表 [SWS_CORE_03092] 的重载。

本文由 AI 创建,完全基于 AUTOSAR 版本 R25-11 的规范数据。

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception safe
Verletzungen (Violations)IsoStdLengthEr- Description as per std::length_error rorViolation

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

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

函数 assign [SWS_CORE_03089]

BasicString & assign (const value_type *s);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

头文件 ara/core/string.h 中类 ara::core::BasicString([SWS_CORE_03089])的同步成员函数 assign 将字符串对象的当前内容替换为 const value_type* 类型的传入字符序列 s。该调用返回对已修改对象的引用(*this)。功能行为遵循 ISO C++ 标准对 [basic.string] 的规定,文档记录的差异在于字符类型 charT 被 value_type 替换([SWS_CORE_03089])。解释:由于缺少单独的长度参数,指针 s 应当指向以空字符结尾的字符数组。 问题 Q-eea79e929750c27f (未决)

在错误处理和稳健性方面,该赋值函数被归类为非异常安全(not exception safe)([SWS_CORE_03089])。与诸如 assign(const BasicString&, size_type, size_type)([SWS_CORE_03086])或 assign(const value_type*, size_type)([SWS_CORE_03088])之类的相关重载相比,未为此变体定义诸如 IsoStdOutOfRangeViolation 或 IsoStdLengthErrorViolation 之类的特定运行时违规。

在模块 core 中,该函数是用于内容赋值的全面重载族的一部分。除了裸指针外,这还涵盖完整字符串([SWS_CORE_03084])、移动语义([SWS_CORE_03085])、StringView 实例([SWS_CORE_03087])、重复单字符([SWS_CORE_03090])、迭代器范围([SWS_CORE_03091])和初始化列表([SWS_CORE_03092])。AUTOSAR 在容器类型如 ara::core::Vector([SWS_CORE_01328])中也提供了同类的赋值模式。

本文本由 AI 创建。所有信息均基于 AUTOSAR 规范。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03089
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03089@rel:R25-11#57a756c0
Content hash
57a756c0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03089
Status: valid/unmigrated Version: rel:R25-11#6afeebe4 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_03089@rel:R25-11#6afeebe4
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

函数 assign [SWS_CORE_03090]

BasicString & assign (size_type n, value_type c);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

使用

类 ara::core::BasicString 的成员函数 assign(在 #include "ara/core/string.h" 中定义)通过 value_type 类型的字符 c 的 n 个连续副本同步替换字符串的当前内容 [SWS_CORE_03090]。其语义符合针对 [basic.string] 的规定,不同之处在于类型参数 charT 被 value_type 替换 [SWS_CORE_03090]。作为返回值,该函数提供对已修改实例的左值引用(*this),这支持链式执行进一步操作。

错误处理与异常安全性

根据规范,该操作被显式归类为 not exception safe [SWS_CORE_03090]。与其他在超出边界时引发定义的违规(如 IsoStdOutOfRangeViolation [SWS_CORE_03086] 或 IsoStdLengthErrorViolation [SWS_CORE_03088])的重载不同,此函数未指定特定的违规。如果必需的内存分配失败,则不对先前对象状态的维持作任何保证。

并发性与限制

由于赋值直接修改内部缓冲区且未指定内部同步,因此多个线程对同一实例的同时访问应当不是线程安全的(解释)。 问题 Q-50f419c4bca5c151 (未决)并行调用必须由调用方在外部进行协调。

相互作用

该函数补充了 ara::core::BasicString 的赋值组合,该组合除复制和移动赋值 [SWS_CORE_03084]、[SWS_CORE_03085] 以及迭代器和初始化列表 [SWS_CORE_03091]、[SWS_CORE_03092] 外,还提供了用于字符串视图的接口 [SWS_CORE_03087]。带重复计数的类似赋值模式同样存在于 ara::core::Vector::assign [SWS_CORE_01329] 中。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03090
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03090@rel:R25-11#4c6eae91
Content hash
4c6eae91
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03090
Status: valid/unmigrated Version: rel:R25-11#5d986d44 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_03090@rel:R25-11#5d986d44
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

函数 assign [SWS_CORE_03091]

template <class InputIterator> BasicString & assign (InputIterator first, InputIterator last);

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString 的模板成员函数 assign 根据 [basic.string] [SWS_CORE_03091] 中的规定,通过范围 [first, last) 的元素同步替换字符串的内容。它需要两个输入迭代器作为参数,并作为返回值提供修改后实例(BasicString&)的引用 [SWS_CORE_03091]。

在错误安全性方面,该函数明确声明为 not exception safe [SWS_CORE_03091]。与为其指定了特定错误检查(如 IsoStdOutOfRangeViolation [SWS_CORE_03086] 或 IsoStdLengthErrorViolation [SWS_CORE_03088])的其他重载不同,规范未为此迭代器范围指明单独的 Violations。如果在赋值时发生内存分配错误,则不存在异常保证。

规范未对可重入性和并发性作出明确陈述。在多个线程对同一 BasicString 实例进行并发读取或写入访问时,该函数推测不是线程安全的,需要应用程序端进行同步。 问题 Q-1c5502b72f566eda (未决)

在模块中,该接口补充了赋值运算符以及复制赋值重载 [SWS_CORE_03084]、有条件异常安全的移动赋值 [SWS_CORE_03085] 以及通过 StringView [SWS_CORE_03087] 和 std::initializer_list [SWS_CORE_03092] 的赋值。AUTOSAR Adaptive 也为 ara::core::Vector 提供了等效的迭代器赋值 [SWS_CORE_01328]。

本使用说明基于 AUTOSAR Adaptive R25-11 规范。

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

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

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

函数 assign [SWS_CORE_03092]

BasicString & assign (std::initializer_list< value_type >);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

定义在头文件 ara/core/string.h 中的类 ara::core::BasicString 的同步成员函数 assign([SWS_CORE_03092]),用传入的 std::initializer_list<value_type> 的值替换调用实例的先前内容。功能行为完全遵循 ISO C++ 标准针对 [basic.string] 的规定,唯一的特定偏差是 C++ 标准类型 charT 被替换为 value_type([SWS_CORE_03092])。成功赋值后,该方法返回对修改后的 BasicString 对象本身的引用([SWS_CORE_03092])。

对于执行,分类 not exception safe 适用([SWS_CORE_03092])。在发生错误时,既未为该重载定义特定的 DET 或 DEM 消息,也未定义单独的 AUTOSAR 违规。这使得该函数有别于相关的重载,例如在位置无效时引发 IsoStdOutOfRangeViolation 的 [SWS_CORE_03086],或者在超出 max_size() 时以 IsoStdLengthErrorViolation 响应的 [SWS_CORE_03088]。

在 ara::core::BasicString 的整个体系中,该函数与替代赋值接口密切相关。其中包括常规拷贝赋值([SWS_CORE_03084])、有条件异常安全的移动赋值([SWS_CORE_03085])、通过 StringView 进行的赋值([SWS_CORE_03087])、指针赋值([SWS_CORE_03089])、单个字符重复赋值([SWS_CORE_03090])或迭代器范围赋值([SWS_CORE_03091])。此外,序列容器 ara::core::Vector 也通过 [SWS_CORE_01330] 对初始化列表遵循相同的设计模式。

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

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

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

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

函数 assign [SWS_CORE_03306]

template <class T> BasicString & assign (const T &t, size_type pos, size_type n=npos);

As per corresponding usage in [basic.string] except for the following deviations: 1. if (pos > sv.size()) IsoStdOutOfRangeViolation is raised instead of std:: out_of_range

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

类 ara::core::BasicString 的模板成员函数 assign 从位置 pos 开始将对象 t 长度最多为 n 个字符的子序列赋给实例,并返回对该对象的引用 [SWS_CORE_03306]。该函数在头文件 ara/core/string.h 中定义,并遵循 [basic.string] 的行为 [SWS_CORE_03306]。

关于错误处理,存在特定的偏差:如果 pos > sv.size() 成立,则引发 IsoStdOutOfRangeViolation 而非 std::out_of_range [SWS_CORE_03306]。该函数被归类为非异常安全(not exception safe)[SWS_CORE_03306]。

限制以及与相关接口的交互:

  • 解释:由于未指定线程安全性,因此在没有外部同步的情况下,对同一实例的同时读取和写入访问可能不是线程安全的。 问题 Q-a909f00530d3ada1 (未决)
  • 来自另一个 BasicString 的子序列赋值遵循带有 IsoStdOutOfRangeViolation 的相同错误语义 [SWS_CORE_03086]。
  • ara::core::BasicString 中的其他变体允许赋值 StringView [SWS_CORE_03087] 或字符数组 [SWS_CORE_03088],其中后者在超长时引发 IsoStdLengthErrorViolation [SWS_CORE_03088]。

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

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception 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_03306
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03306@rel:R25-11#568730d9
Content hash
568730d9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03306
Status: valid/unmigrated Version: rel:R25-11#6d44c82a Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03306@rel:R25-11#6d44c82a
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#79fe763c2026-09-30
  • R19-11rel:R19-11#861a90ae2026-10-14
  • R20-11rel:R20-11#d8e748762026-10-14
  • R21-11rel:R21-11#63bad1582026-10-14
  • R22-11rel:R22-11#e94346be2026-10-14
  • R23-11rel:R23-11#9494256b2026-10-14
  • R24-11rel:R24-11#f1c581ec2026-10-14
  • R25-11rel:R25-11#6d44c82a2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 at [SWS_CORE_03063]

const_reference at (size_type pos) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. if (pos >= size()) IsoStdOutOfRangeViolation is raised instead of std:: out_of_range

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

类 ara::core::BasicString 的成员函数 at([SWS_CORE_03063],在头文件 ara/core/string.h 中声明)提供对位置 pos 处字符的同步只读直接访问。它返回对所寻址元素的 const_reference 作为返回值。

其功能行为基本上遵循 [basic.string] 的 C++ 标准,但在错误处理方面有所不同:当索引超出有效范围(pos >= size())时,该函数会触发 IsoStdOutOfRangeViolation 而非 std::out_of_range [SWS_CORE_03063]。在异常安全性方面,该函数被明确归类为 not exception safe [SWS_CORE_03063]。

未记录关于线程安全性的限制;解释:只要没有对同一实例的并发写操作,常量读取访问可能具备可重入性。 问题 Q-bda65b88abb531ce (未决)该方法的修改性对应项是非常量重载 reference at(size_type pos) [SWS_CORE_03064]。其他核心容器也采用了相同的在范围违规时使用 IsoStdOutOfRangeViolation 的错误概念,包括 ara::core::Vector([SWS_CORE_01354]、[SWS_CORE_01355])以及 ara::core::StringView([SWS_CORE_02133])和 ara::core::Array([SWS_CORE_01273]、[SWS_CORE_01274])。

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

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception 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_03063
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03063@rel:R25-11#ecedb81f
Content hash
ecedb81f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03063
Status: valid/unmigrated Version: rel:R25-11#f821ef4d 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_03063@rel:R25-11#f821ef4d
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

函数 at [SWS_CORE_03064]

reference at (size_type pos);

As per corresponding usage in [basic.string] except for the following deviations: 1. if (pos >= size()) IsoStdOutOfRangeViolation is raised instead of std:: out_of_range

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

类 ara::core::BasicString([SWS_CORE_03064])的成员函数 at 通过头文件 #include "ara/core/string.h" 提供([SWS_CORE_03064]),授予对位置 pos 处字符的同步访问权限,并返回可变引用(reference)([SWS_CORE_03064])。基本语义遵循标准 [basic.string]([SWS_CORE_03064])。

在错误处理方面,该实现特意偏离了 C++ 标准:如果满足条件 pos >= size(),则会触发违规 IsoStdOutOfRangeViolation([SWS_CORE_03064]),而不是引发 std::out_of_range 异常。该函数被归类为 not exception safe([SWS_CORE_03064])。解释:在 AUTOSAR 运行时系统中,越界违规可能会导致终止,或者通过 AddAbortHandler([SWS_CORE_00054])调用已注册的错误例程。 问题 Q-91f3adeb10b4ec67 (未决)

关于并发性和约束条件,该操作未声明线程安全性([SWS_CORE_03064])。解释:由于对字符串执行修改访问,对同一实例的并发调用可能需要外部同步。 问题 Q-d5ec3710f4b8e525 (未决)

对于常量实例的读取访问,提供了重载 const_reference at(size_type pos) const([SWS_CORE_03063])。通过 IsoStdOutOfRangeViolation 处理越界行为遵循了核心类型的统一模式,该模式同样针对 ara::core::Vector([SWS_CORE_01355])、ara::core::Array([SWS_CORE_01273])、ara::core::Map([SWS_CORE_01456])以及 ara::core::StringView([SWS_CORE_02133])进行了规范。

本段文本由 AI 基于 AUTOSAR 有效负载生成。

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception 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_03064
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03064@rel:R25-11#388817bc
Content hash
388817bc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03064
Status: valid/unmigrated Version: rel:R25-11#a56d3907 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_03064@rel:R25-11#a56d3907
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

函数 back [SWS_CORE_03067]

reference back ();

As per corresponding usage in [basic.string]

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

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

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

函数 back [SWS_CORE_03068]

const_reference back () const;

As per corresponding usage in [basic.string]

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

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

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

函数 begin [SWS_CORE_03039]

iterator begin () noexcept;

As per corresponding usage in [basic.string]

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

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

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

函数 begin [SWS_CORE_03040]

const_iterator begin () const noexcept;

As per corresponding usage in [basic.string]

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

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

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

函数 c_str [SWS_CORE_03069]

const value_type * c_str () const noexcept;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

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

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

函数 capacity [SWS_CORE_03055]

size_type capacity () const noexcept;

As per corresponding usage in [basic.string]

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

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

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

函数 cbegin [SWS_CORE_03047]

const_iterator cbegin () const noexcept;

As per corresponding usage in [basic.string]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03047
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03047@rel:R25-11#4d100c7a
Content hash
4d100c7a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03047
Status: valid/unmigrated Version: rel:R25-11#2b7075ee 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_03047@rel:R25-11#2b7075ee
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

函数 cend [SWS_CORE_03048]

const_iterator cend () const noexcept;

As per corresponding usage in [basic.string]

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

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

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

函数 clear [SWS_CORE_03057]

void clear () noexcept;

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString 的成员函数 clear 用于清空字符串实例的内容,与 [basic.string] [SWS_CORE_03057] 中的相应用法一致。它通过头文件 #include "ara/core/string.h" 引入 [SWS_CORE_03057]。

使用

该操作具有签名 void clear () noexcept;,不接受任何参数且没有返回值 [SWS_CORE_03057]。调用在相应实例上同步进行。解释:依据 [basic.string] 中引用的语义,该函数可能会移除所有包含的字符,并将字符串的长度重置为零。 问题 Q-242b714c4fead3cf (未决)

错误处理

该函数被分类为异常安全(exception safe),并使用说明符 noexcept 进行声明 [SWS_CORE_03057]。不会抛出 C++ 异常。规范中未为该函数指定特定的错误码、DET 或 DEM 消息 [SWS_CORE_03057]。

相互作用

在模块 core 中,容器的清理遵循统一的设计模式。相同的语义和签名也出现在来自 ara/core/vector.h 的 ara::core::Vector::clear [SWS_CORE_01375] 以及来自 ara/core/map.h 的 ara::core::Map::clear [SWS_CORE_01485] 中,它们同样被指定为同步、无参数且为 noexcept [SWS_CORE_03057] [SWS_CORE_01375] [SWS_CORE_01485]。

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

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

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

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

函数 compare [SWS_CORE_03321]

int compare (StringView sv) const noexcept;

As per corresponding usage in [basic.string]

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

使用

类 ara::core::BasicString([SWS_CORE_03321])的成员函数 compare 用于将字符串内容与传入的 StringView 进行同步的字典序比较 sv。功能语义遵循 C++ 标准构造 [basic.string]([SWS_CORE_03321])。解释:如果字符串在字典序上排在 sv 之前,则类型为 int 的返回值小于零;在相等时恰好为 0;如果排在 sv 之后,则为正值。 问题 (未决)

错误处理与异常安全性

该方法声明为 noexcept 并指定为异常安全(exception safe)([SWS_CORE_03321])。它不抛出异常,也不通过错误代码或通过 DET 或 DEM 机制报告错误。

并发性与限制

由于它是一个对实例状态没有修改副作用的常量操作(const)([SWS_CORE_03321]),因此只要不发生并发写入访问,从多个执行上下文进行的并发读取调用大概应当是线程安全的(解释)。 问题 (未决)

相互作用

虽然 ara::core 中的许多数据类型(例如 ErrorCode([SWS_CORE_00571])或 Result([SWS_CORE_00780]))依赖于布尔相等运算符,但 compare([SWS_CORE_03321])支持三值排序检查,可与诸如 Map::value_compare([SWS_CORE_01423])之类的比较对象的准则相媲美。

本段文本由 AI 生成,用作规范元素的使用指南。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03321
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03321@rel:R25-11#9978d740
Content hash
9978d740
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03321
Status: valid/unmigrated Version: rel:R25-11#d1d61e02 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03321@rel:R25-11#d1d61e02
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#8ce75f1e2026-09-30
  • R19-11rel:R19-11#35f025472026-10-14
  • R20-11rel:R20-11#8780c3062026-10-14
  • R21-11rel:R21-11#ca37f6cf2026-10-14
  • R22-11rel:R22-11#21ef93772026-10-14
  • R23-11rel:R23-11#93a063862026-10-14
  • R24-11rel:R24-11#50ef39672026-10-14
  • R25-11rel:R25-11#d1d61e022026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 compare [SWS_CORE_03322]

int compare (size_type pos1, size_type n1, StringView sv) const;

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString 的成员函数 compare 允许将子字符串与字符串视图([SWS_CORE_03322])进行同步字典序比较。

用法与参数

该方法在 ara::core::BasicString 的实例上同步调用([SWS_CORE_03322])。根据签名,它接受以下参数:

语义遵循 [basic.string] 中的相应用法([SWS_CORE_03322])。类型为 int 的返回值在相等时应为零,并在存在字典序差异时取负值或正值。 问题 Q-15a8b7e331f5f518 (未决)

错误处理与限制

关于异常处理,该函数被归类为 not exception safe([SWS_CORE_03322])。规范中未指出特定错误码以及诸如 DET 或 DEM 等机制。作为 const 限定的成员函数,该调用不会改变实例的状态([SWS_CORE_03322])。对于线程安全性或重入性,有效负载未包含明确说明。

相互作用

该函数通过头文件 ara/core/string.h 提供,并扩展了命名空间 ara::core 中类型化比较操作的范围,例如为 ErrorCode([SWS_CORE_00571])或 Result([SWS_CORE_00780])定义的操作。

本使用说明基于 core 模块的规范(Release R25-11)自动生成。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03322
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03322@rel:R25-11#b82891d0
Content hash
b82891d0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03322
Status: valid/unmigrated Version: rel:R25-11#b09a7e38 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03322@rel:R25-11#b09a7e38
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#a54addf22026-09-30
  • R19-11rel:R19-11#d75e45392026-10-14
  • R20-11rel:R20-11#74b8bdd52026-10-14
  • R21-11rel:R21-11#1eaae95f2026-10-14
  • R22-11rel:R22-11#c7bb44272026-10-14
  • R23-11rel:R23-11#457386952026-10-14
  • R24-11rel:R24-11#0a376bc42026-10-14
  • R25-11rel:R25-11#b09a7e382026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 compare [SWS_CORE_03323]

template <typename T> int compare (size_type pos1, size_type n1, const T &t, size_type pos2, size_type n2=npos) const;

As per corresponding usage in [basic.string]

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

使用

类 ara::core::BasicString 的模板成员函数 compare([SWS_CORE_03323],头文件 ara/core/string.h)用于将当前实例的子片段与传入对象 t 的子范围进行同步字典序比较。其行为遵循 C++ 标准 [SWS_CORE_03323] 中 [basic.string] 的定义。参数 pos1 和 n1 确定调用实例子范围的起始位置和长度,而 pos2 和 n2 则指定 t 中待比较的片段。

返回值是一个带符号的 int 值 [SWS_CORE_03323],表示相对顺序:当自身子字符串在前时小于零,相等时为零,在后时大于零。

错误处理与边界条件

关于错误处理,该函数被规范为 not exception safe [SWS_CORE_03323];此操作不存在 AUTOSAR 特定错误码、DET 或 DEM 消息。解释:调用方必须预先确保索引有效,因为由于缺少异常处理,无效的范围参数可能大概率会导致未定义行为。 问题 Q-ae28f07a1f86f827 (未决)

相互作用

该方法被声明为 const [SWS_CORE_03323]。基础运算符如 ErrorCode([SWS_CORE_00571])或 Result([SWS_CORE_00780])中的 operator== 仅检查布尔相等性,而 compare 则提供子范围上的三值顺序关系。

本使用说明基于 Release R25-11 的 AUTOSAR Adaptive 规范。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03323
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03323@rel:R25-11#31bbc5d0
Content hash
31bbc5d0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03323
Status: valid/unmigrated Version: rel:R25-11#053e2363 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03323@rel:R25-11#053e2363
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#2fc0c4ce2026-09-30
  • R19-11rel:R19-11#1299c99a2026-10-14
  • R20-11rel:R20-11#49b818ff2026-10-14
  • R21-11rel:R21-11#829bdb6e2026-10-14
  • R22-11rel:R22-11#b98e935f2026-10-14
  • R23-11rel:R23-11#6fe6e5ba2026-10-14
  • R24-11rel:R24-11#6a276da32026-10-14
  • R25-11rel:R25-11#053e23632026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 compare [SWS_CORE_03346]

int compare (const BasicString &str) const noexcept;

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString 的成员函数 compare([SWS_CORE_03346])用于将一个字符串与另一个类型为 BasicString 的实例 str 进行同步字典序比较。语义遵循 [basic.string] 中的标准化用法([SWS_CORE_03346])。解释:据此,当两个字符串一致时,返回的整数值 int 应为 0;当调用实例在字典序上排在参数 str 之前或之后时,该值应小于或大于 0。 问题 (未决)

关于错误处理和异常安全性,该函数被声明为 noexcept,并被明确归类为 exception safe([SWS_CORE_03346])。不存在特定的错误码、用于错误指示的返回值或 DET/DEM 消息。在常规流程中排除了操作失败的情况,因为比较不会引发异常。

作为 const 限定的方法,该函数不会修改对象的状态。解释:由于规范未对线程安全性作出明确说明,多个线程对同一实例的同时读取访问应该是安全的,而并发的修改操作必须进行外部同步。 问题 Q-6a47db8a35fa6c73 (未决)

在 ara::core 的整体系统中,该函数属于关系比较操作体系,对于其他核心类型,这些操作部分通过相等运算符提供,例如 [SWS_CORE_00137] 中针对 ErrorDomain、[SWS_CORE_00571] 中针对 ErrorCode 以及 [SWS_CORE_00780] 中针对 Result。

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

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

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

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

函数 compare [SWS_CORE_03347]

int compare (size_type pos1, size_type n1, const BasicString &str) const;

As per corresponding usage in [basic.string]

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

使用

类 ara::core::BasicString 的成员函数 compare 同步比较调用实例的已定义子字符串与另一个类型为 BasicString 的实例 [SWS_CORE_03347]。用于包含的头文件为 ara/core/string.h。通过参数 pos1 和 n1 确定待比较字符的起始位置和最大数量,而 str 引用用于比较的字符串。以整数值(int)的形式返回,该值指示字典顺序:小于零的值表示自身子片段位于 str 之前,零值表示相等,大于零的值表示位于其后。

错误处理与异常安全性

在规范中,该函数被明确声明为 not exception safe [SWS_CORE_03347]。该函数不存在特定错误码、AUTOSAR 返回类型(如 ara::core::Result)或 DET/DEM 消息。由于其行为参考了 ISO C++ 条款 [basic.string],大于当前字符串长度的起始位置 pos1 可能会导致越界异常。 问题 Q-ad43b26dc523e0dc (未决)

并发性与限制

作为 const 限定的方法,compare 不会改变自身字符串的状态 [SWS_CORE_03347]。解释:只要不存在并发写入访问,来自多个线程对同一对象的同时读取调用应当是允许的。 问题 Q-ab412b269ca8566f (未决)对于同时进行的修改,调用方必须确保充分的同步。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03347
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03347@rel:R25-11#36a71d6d
Content hash
36a71d6d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03347
Status: valid/unmigrated Version: rel:R25-11#990aa89e 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_03347@rel:R25-11#990aa89e
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

函数 compare [SWS_CORE_03348]

int compare (size_type pos1, size_type n1, const BasicString &str, size_type pos2, size_type n2=npos) const;

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString 的方法 compare([SWS_CORE_03348])在子字符串之间执行同步的三值字典序比较。调用方传入自身实例的起始位置和最大长度(pos1、n1)以及目标字符串 str 的相应参数(pos2、n2)。此时语义完全符合 ISO C++ 标准 [basic.string] 中 std::basic_string::compare 的行为。

返回值为 int,其评估规则如下:

  • 如果自身子字符串在字典序上位于传入子字符串之前,则小于 0。
  • 如果两个子范围完全相同,则为 0。
  • 如果自身子字符串在字典序上位于传入子字符串之后,则大于 0。

关于错误处理和健壮性,根据规范,该函数被声明为 not exception safe([SWS_CORE_03348])。不存在 AUTOSAR 特定错误码或 DET 条目。如果索引边界错误,例如 pos1 或 pos2 超过相应字符串长度,根据 C++ 标准解释,该函数可能会引发诸如 std::out_of_range 的范围错误(解释:沿用 ISO C++ 标准语义)。 问题 Q-22ed96aecc8f0bec (未决)

该方法被限定为 const([SWS_CORE_03348]),且不会修改所涉及的实例。尽管未指定明确的线程安全性,但只要不存在并发写入操作,对同一对象的并发读取应该是非临界的。 问题 Q-eb2bf8c6b3c53505 (未决)与 ara::core::ErrorCode([SWS_CORE_00571])等二元比较运算符不同,compare 提供了更细致的排序顺序。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03348
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03348@rel:R25-11#15661cea
Content hash
15661cea
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03348
Status: valid/unmigrated Version: rel:R25-11#2f1feeed 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_03348@rel:R25-11#2f1feeed
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

函数 compare [SWS_CORE_03349]

int compare (const value_type *s) const;

As per corresponding usage in [basic.string]

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

使用

来自头文件 #include "ara/core/string.h" 的类 ara::core::BasicString 的成员函数 compare 用于根据 [basic.string] 的行为执行同步字典序字符串比较 [SWS_CORE_03349]。它将底层字符串与传入的类型为 const value_type* 的字符序列 s 进行比较,并返回类型为 int 的整数结果 [SWS_CORE_03349]。解释:参数 s 应当指向一个有效的以空字符结尾的字符数组,其中当自身字符串在字典序上较小时返回值大概率为负,匹配时为零,较大时为正。 问题 Q-f54a24333329a936 (未决)

错误处理与异常安全性

规范将该方法明确标记为 not exception safe [SWS_CORE_03349]。不存在 no-throw 保证,并且可能的错误不会通过结构化类型(如 ara::core::ErrorCode)返回。此调用未预设诸如 DET 或 DEM 消息等特定平台错误消息。

并发性与交互

与模块 core 中针对 ErrorCode [SWS_CORE_00571] 等线程安全的比较运算符相反,compare 未指定线程安全性 [SWS_CORE_03349]。由于该成员函数被声明为 const,只要不发生并发修改,同一实例上的并行读取访问应该是非临界的。 问题 Q-6c1ddb8ba210dceb (未决)模块 core 还为领域和结果类型定义了比较运算符,例如 ErrorDomain [SWS_CORE_00137] 或 Result [SWS_CORE_00780],而 compare 则专门为字符串提供三值关系顺序。

本文本由 AI 整理。所有说明均基于 AUTOSAR 标准 Release R25-11 的要求。

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

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

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

函数 compare [SWS_CORE_03350]

int compare (size_type pos1, size_type n1, const value_type *s) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

类 ara::core::BasicString 的成员函数 compare([SWS_CORE_03350])将当前实例的子字符串与以空字符结尾的 C 风格字符串进行同步比较。该函数通过 #include "ara/core/string.h" 引入。作为参数,它需要起始索引 pos1(类型为 size_type)、最大字符数 n1 以及类型为 const value_type* 的指针 s。返回值是一个整数类型的 int 值,反映了字典序顺序关系([SWS_CORE_03350])。

函数语义遵循 [basic.string] 中的行为,具体差异在于 charT 被替换为 value_type([SWS_CORE_03350])。对于错误处理,未定义 DET 或 DEM 消息,也未定义特定错误码。关于异常安全性,该函数被明确归类为“not exception safe”([SWS_CORE_03350])。

在并发方面,作为 const 函数,该方法不会修改对象的内部状态。解释:只要不发生并发写入访问,对同一对象的并行读取调用应该无需额外同步即可进行。 问题 Q-31d2135fb294e41b (未决)调用方必须确保 s 指向有效的字符数组。

在 ara::core 的整体系统中,compare 融入了基础类型的比较机制中,可与 ara::core::ErrorCode([SWS_CORE_00571])或 ara::core::Result([SWS_CORE_00780])的相等和不等运算符相媲美,但与简单运算符不同,它为子范围提供了细致的三值评估。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03350
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03350@rel:R25-11#51fe1f6d
Content hash
51fe1f6d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03350
Status: valid/unmigrated Version: rel:R25-11#060e5e97 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_03350@rel:R25-11#060e5e97
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

函数 compare [SWS_CORE_03351]

int compare (size_type pos1, size_type n1, const value_type *s, size_type n2) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

根据 [SWS_CORE_03351] 的成员函数 compare 允许对 ara::core::BasicString 当前实例的子序列与外部字符数组进行字典序三路比较。该函数通过头文件 #include "ara/core/string.h" 提供,并作为同步、常量成员函数(const)调用。

语义遵循标准 C++ 章节 [basic.string] 中的相应用法,其中 charT 被替换为 value_type([SWS_CORE_03351])。参数通过起始索引 pos1 和长度 n1 定义调用实例中待比较的子序列,并通过指针 s(类型为 const value_type*)和要考虑的字符数 n2 定义外部目标数组。返回值是一个整数值(int),在匹配时返回零,在存在字典序差异时返回负值或正值。

关于错误安全性,compare 被规范为 not exception safe([SWS_CORE_03351])。规范未定义特定的 DET 或 DEM 消息;索引无效或内存访问时的可能错误状态应该会根据 [basic.string] 的引用语义通过 C++ 异常来报告。 问题 Q-74c52d9534473bde (未决)由于未声明线程安全性,在存在并发写入操作时,对同一字符串的同时访问需要外部同步。

在平台上下文中,compare 用于基础字符串处理,并构成在此基础上构建的比较和相等性检查的基础,就像通过比较运算符在诸如 ara::core::Result 或 ara::core::ErrorCode 等其他核心数据类型中实现的那样。

本文本由 AI 生成。如有疑问,以 AUTOSAR 规范为准。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03351
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03351@rel:R25-11#0767ae57
Content hash
0767ae57
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03351
Status: valid/unmigrated Version: rel:R25-11#5cb45c38 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_03351@rel:R25-11#5cb45c38
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

函数 copy [SWS_CORE_03410]

size_type copy (value_type *s, size_type n, size_type pos=0) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type 2. if ( pos > size() ) IsoStdOutOfRangeViolation is raised instead of std:: out_of_range

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

来自头文件 #include "ara/core/string.h" 的同步成员函数 copy 属于类 ara::core::BasicString([SWS_CORE_03410])。它将从起始位置 pos 开始的最多 n 个字符的子序列复制到目标内存 s 中。参数 pos 具有默认值 0。作为返回值,该类型为 size_type 的函数提供实际写入字符的精确数量。该行为遵循 C++ 标准中 [basic.string] 的规定,不同之处在于字符类型 charT 被替换为 value_type([SWS_CORE_03410])。

对于错误处理和边界条件,适用以下规范:

  • 范围检查:如果指定位置位于字符串末尾之后(pos > size()),则会引发 IsoStdOutOfRangeViolation,而不是标准异常 std::out_of_range([SWS_CORE_03410])。
  • 异常安全性:根据规范,该操作不具备异常安全性(not exception safe)([SWS_CORE_03410])。
  • 缓冲区容量:解释:调用者必须确保由 s 寻址的内存区域为要写入的字符提供足够的容量,因为该接口不验证目标缓冲区大小。 问题 Q-7aa92ad8a7dff94d (未决)

在模块 core 中,该函数与 ara::core::StringView 中的同名方法不同([SWS_CORE_02140]):StringView::copy 被声明为 noexcept 并被指定为具有异常安全性,而 BasicString::copy 则不提供 noexcept 保证([SWS_CORE_03410])。

该文本由 AI 系统基于 AUTOSAR Adaptive R25-11 规范生成。

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception 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_03410
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03410@rel:R25-11#13333e01
Content hash
13333e01
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03410
Status: valid/unmigrated Version: rel:R25-11#84a265c0 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_03410@rel:R25-11#84a265c0
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

函数 crbegin [SWS_CORE_03049]

const_reverse_iterator crbegin () const noexcept;

As per corresponding usage in [basic.string]

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

根据 [SWS_CORE_03049],类 ara::core::BasicString 的成员函数 crbegin 同步返回指向字符串最后一个元素的常量反向迭代器(const_reverse_iterator)。该函数不接收传递参数,并以标准概念 [basic.string] 中的相应用法为导向。

该操作被指定为 exception safe 并带有标识符 noexcept [SWS_CORE_03049],因此在运行时不会引发异常。规范中未提供特定的错误代码以及通过 DET 或 DEM 进行错误记录的机制。

关于并发性和限制,需要注意的是,这是一个非修改性的 const 方法;因此对同一字符串实例的并发读取访问应该是线程安全的。 问题 Q-8729e18859784971 (未决)在迭代期间不得对实例进行任何修改操作,以避免产生无效迭代器。

在模块 core 内部,该函数确保了与其他容器和辅助类的一致语义:

与 Array、Span 和 StringView 中被标明为 constexpr 的实现不同,BasicString 的 crbegin 以及 Vector 和 Map 均被定义为纯运行时方法。

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

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

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

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

函数 crend [SWS_CORE_03050]

const_reverse_iterator crend () const noexcept;

As per corresponding usage in [basic.string]

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

使用

类 ara::core::BasicString 的成员函数 crend 通过头文件 #include "ara/core/string.h" 提供([SWS_CORE_03050])。调用在实例上同步且无参数地进行,并返回一个 const_reverse_iterator。该迭代器通过指向紧接在第一个字符之前的理论元素来标记反向迭代的终点。语义符合 [basic.string] 所述的 C++ 标准库([SWS_CORE_03050])。

错误处理

该方法被声明为 noexcept,并被指定为异常安全(exception safe)([SWS_CORE_03050])。它不引发异常;对于此调用,不存在特定的错误代码或向 DET 或 DEM 的消息。

并发性与限制

由于 crend 被声明为 const 且不修改底层对象,因此跨多个线程的并发读取访问在无需同步的情况下应该是安全的(解释:标准 C++ 容器行为)。 问题 Q-7b502a7db77e21c4 (未决)相比之下,对 ara::core::BasicString 的同一实例进行并发写入访问则需要外部同步,因为修改可能会影响迭代器的有效性。

相互作用

在 AUTOSAR Adaptive Core 内部,crend 融入了统一的迭代器概念中:

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03050
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03050@rel:R25-11#8495737e
Content hash
8495737e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03050
Status: valid/unmigrated Version: rel:R25-11#304a10ef 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_03050@rel:R25-11#304a10ef
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

函数 data [SWS_CORE_03070]

const value_type * data () const noexcept;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

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

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

函数 data [SWS_CORE_03071]

value_type * data () noexcept;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

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

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

函数 empty [SWS_CORE_03051]

bool empty () const noexcept;

As per corresponding usage in [basic.string]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03051
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03051@rel:R25-11#334d23b1
Content hash
334d23b1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03051
Status: valid/unmigrated Version: rel:R25-11#959874ab 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_03051@rel:R25-11#959874ab
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

函数 end [SWS_CORE_03041]

iterator end () noexcept;

As per corresponding usage in [basic.string]

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

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

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

函数 end [SWS_CORE_03042]

const_iterator end () const noexcept;

As per corresponding usage in [basic.string]

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

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

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

函数 erase [SWS_CORE_03102]

BasicString & erase (size_type pos=0, size_type n=npos);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type 2. if ( pos > size() ) IsoStdOutOfRangeViolation is raised instead of std:: out_of_range

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

类 ara::core::BasicString([SWS_CORE_03102],在 #include "ara/core/string.h" 中声明)的同步成员函数 erase 用于从字符串中移除字符。该调用在实例上执行,需指定起始索引 pos(默认值 0)以及要移除的最大数量 n(默认值 npos)。返回值提供对修改后对象的引用(BasicString &)[SWS_CORE_03102]。其工作原理遵循 C++ 标准 [basic.string],其中 charT 被 value_type 替换 [SWS_CORE_03102]。

关于错误处理和约束条件,以下规范适用:

  • 范围检查:如果起始索引大于字符串长度(pos > size()),则会触发 AUTOSAR 违规 IsoStdOutOfRangeViolation,而不是 std::out_of_range [SWS_CORE_03102]。
  • 异常安全性:该操作被显式归类为非异常安全(not exception safe)[SWS_CORE_03102]。
  • 并发性:由于该函数直接修改对象且非异常安全,多个线程在未受保护的情况下同时访问同一实例可能会导致数据不一致。 问题 Q-1ba559168d94c7a5 (未决)

在核心库内部的交互中,ara::core::BasicString 除了提供此基于索引的变体外,还提供了基于迭代器的重载:针对单个位置的 erase(const_iterator) [SWS_CORE_03103] 以及针对范围的 erase(const_iterator, const_iterator) [SWS_CORE_03104]。用于移除元素的类似接口在整个容器范围内也可在 ara::core::Vector([SWS_CORE_01372]、[SWS_CORE_01373])以及 ara::core::Map([SWS_CORE_01480] 至 [SWS_CORE_01483])中找到。

本使用说明为自动生成,且完全基于 AUTOSAR Adaptive R25-11 的规范数据。

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception 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_03102
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03102@rel:R25-11#434e59d1
Content hash
434e59d1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03102
Status: valid/unmigrated Version: rel:R25-11#a1c3b751 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_03102@rel:R25-11#a1c3b751
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

函数 erase [SWS_CORE_03103]

iterator erase (const_iterator p);

As per corresponding usage in [basic.string]

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

使用

类 ara::core::BasicString ([SWS_CORE_03103]) 的同步成员函数 erase 用于从字符串中移除单个字符。它通过头文件 #include "ara/core/string.h" 提供 [SWS_CORE_03103]。该函数接受一个指向待删除字符的常量迭代器 p 作为参数,并返回指向后继字符的 iterator [SWS_CORE_03103]。其功能行为遵循 [basic.string] 的相应用法 [SWS_CORE_03103]。

错误处理与异常安全性

规范中将该函数标注为“not exception safe”(非异常安全)属性 [SWS_CORE_03103]。不存在特定的错误码、DET 或 DEM 消息。与在超出索引时规定抛出 IsoStdOutOfRangeViolation 的基于索引的重载 [SWS_CORE_03102] 不同,[SWS_CORE_03103] 未定义单独的违规。解释:由于未指定显式的预先检查,传入无效或不可解引用的迭代器可能会导致未定义行为。 问题 Q-e7fef1f0be3f72bb (未决)

并发性与交互

由于未指定同步或重入保证,在没有外部同步的情况下,对同一实例的并发修改访问可能不是线程安全的。 问题 Q-0361bddd6a9924b1 (未决)在 ara::core::BasicString 内部,除该单元素删除外,还提供使用两个迭代器的范围删除 ([SWS_CORE_03104]) 以及基于索引的删除 ([SWS_CORE_03102])。此外,ara::core::Vector ([SWS_CORE_01372], [SWS_CORE_01373]) 和 ara::core::Map ([SWS_CORE_01480], [SWS_CORE_01481], [SWS_CORE_01483]) 也提供了类似的基于迭代器的删除接口。

该文本由 AI 生成,用作参考指引。

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

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

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

函数 erase [SWS_CORE_03104]

iterator erase (const_iterator first, const_iterator last);

As per corresponding usage in [basic.string]

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

使用

类 ara::core::BasicString([SWS_CORE_03104],在 #include "ara/core/string.h" 中声明)的成员函数 erase 同步移除介于 first 和 last 之间的半开范围内的字符序列。它遵循 [basic.string] 的对应语义,并返回指向已删除部分之后位置的 iterator。

错误处理与异常安全性

对于该函数,异常安全性被显式规范为 not exception safe [SWS_CORE_03104]。与在发生越界时提供 IsoStdOutOfRangeViolation 的基于索引的变体 [SWS_CORE_03102] 不同,该规范未针对无效迭代器范围定义特定的错误代码或违规;错误的迭代器可能会导致未定义行为。 问题 Q-4ebb261c37bba102 (未决)

并发性与限制

由于 erase 会修改底层字符串,并且未规范并发机制,因此该函数可能不具备可重入性,或者对于同一实例的并发访问不是线程安全的。 问题 Q-43e6221b78cfa77f (未决)此外,根据 [basic.string] 的标准行为,移除元素大概会使后续的迭代器和引用失效。

相互作用

在 ara::core::BasicString 内部,该函数补充了用于通过迭代器删除单个元素的重载 [SWS_CORE_03103] 以及基于索引的位置删除 [SWS_CORE_03102]。其行为与其它 AUTOSAR 容器(如 ara::core::Vector [SWS_CORE_01373] 或 ara::core::Map [SWS_CORE_01483])基于范围的删除操作相对应。

本段文本为自动生成。技术陈述完全基于规范 R25-11。

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

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

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

函数 find [SWS_CORE_03315]

size_type find (StringView sv, size_type pos=0) const noexcept;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

使用

类 ara::core::BasicString([SWS_CORE_03315])的成员函数 find 同步从指定位置 pos(默认值为 0)开始在字符串中搜索传入的子字符串 StringView sv 的第一次出现。结果作为 size_type 返回。其语义符合 [basic.string] 中的用法,区别在于 charT 被替换为 value_type([SWS_CORE_03315])。该函数通过头文件 ara/core/string.h 提供。

错误处理与异常安全性

该函数声明为 noexcept 并归类为 exception safe([SWS_CORE_03315])。它不抛出异常。未为此函数指定特定 AUTOSAR 错误代码或对 DET 或 DEM 的报告。

并发性

由于 find 声明为 const 且不修改调用对象的状态([SWS_CORE_03315]),因此只要不发生写入操作,多个线程对同一实例的同时读取访问在没有同步的情况下应当是安全的(解释)。 问题 Q-8a91a07d033d0b33 (未决)

相互作用

在 ara::core::BasicString 内部,此方法补充了相关的重载,例如搜索 BasicString 实例([SWS_CORE_03407]),该实例也是 noexcept。与声明为 not exception safe 的单字符重载([SWS_CORE_03324])或指针重载([SWS_CORE_03408]、[SWS_CORE_03409])不同,StringView 变体保证异常安全性。此外,ara::core::StringView 还提供了类似但声明为 constexpr 的 find([SWS_CORE_02157])。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03315
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03315@rel:R25-11#3984bacb
Content hash
3984bacb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03315
Status: valid/unmigrated Version: rel:R25-11#52dd57f0 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03315@rel:R25-11#52dd57f0
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#dafe46b02026-09-30
  • R19-11rel:R19-11#3265cc0c2026-10-14
  • R20-11rel:R20-11#b8a44b832026-10-14
  • R21-11rel:R21-11#0a67971f2026-10-14
  • R22-11rel:R22-11#135879cd2026-10-14
  • R23-11rel:R23-11#cd65affa2026-10-14
  • R24-11rel:R24-11#46213fbb2026-10-14
  • R25-11rel:R25-11#52dd57f02026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 find [SWS_CORE_03324]

size_type find (value_type c, size_type pos=0) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

类 ara::core::BasicString 的同步成员函数 find 从可选起始位置 pos 开始搜索类型为 value_type 的字符 c 的首次出现([SWS_CORE_03324])。语义与 [basic.string] 中的规定相对应,其中 charT 被替换为 value_type([SWS_CORE_03324])。搜索成功时,索引将作为 size_type 返回;否则,根据 [basic.string] 的标准行为,返回值应对应于值 BasicString::npos。 问题 Q-4bb5f66d23256109 (未决)

关于异常安全性,该函数在规范中被显式归类为非异常安全(not exception safe)([SWS_CORE_03324])。有效负载中未定义通过 DET 或 DEM 发出的特定错误或诊断消息。由于该函数被声明为 const,它不会修改对象;因此,对同一实例的并发读取访问在并发方面大概是安全的,而并行写入访问则需要外部同步。 问题 Q-263442932bd08430 (未决)

在核心类型的联合中,该方法补充了 ara::core::BasicString 的相关重载:使用 const value_type* 进行的指针搜索同样被视为非异常安全([SWS_CORE_03408]、[SWS_CORE_03409]),而针对 BasicString([SWS_CORE_03407])和 StringView([SWS_CORE_03315])的重载则被规范为异常安全且为 noexcept。对于非所有权字符串,ara::core::StringView 通过 find(char, size_type) 提供了类似但具备 constexpr 和 noexcept 能力的搜索功能([SWS_CORE_02158])。

本段文本由 AI 生成,基于 R25-11 规范版本。

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

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

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

函数 find [SWS_CORE_03407]

size_type find (const BasicString &str, size_type pos=0) const noexcept;

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString([SWS_CORE_03407],头文件 ara/core/string.h)的成员函数 find 同步搜索传入子字符串 str 的首次出现。搜索可选择从位置 pos 开始(默认值为 0),并遵循 [basic.string] 中的规定。

该函数将找到的索引作为类型为 size_type 的值返回。解释:如果未找到匹配项,该函数根据 [basic.string] 的语义应返回值 BasicString::npos。 问题 Q-610fe2fe50217189 (未决)

在错误处理和并发性方面,该方法被声明为 noexcept,并被规范为异常安全(exception safe)([SWS_CORE_03407])。由于这是一个常量操作(const),该调用不会修改对象;因此,对同一实例的并发读取访问应该是安全的。 问题 Q-045341d1199068db (未决)

在 ara::core::BasicString 内部存在其它搜索函数:除了同样声明为 noexcept 的 StringView 重载([SWS_CORE_03315])之外,还提供了针对单个字符([SWS_CORE_03324])和字符指针([SWS_CORE_03408]、[SWS_CORE_03409])的变体,与此不同的是,它们被归类为非异常安全。相应的搜索操作还可见于 ara::core::StringView([SWS_CORE_02157])和 ara::core::Map([SWS_CORE_01490])。

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

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

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

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

函数 find [SWS_CORE_03408]

size_type find (const value_type *s, size_type pos=0) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

类 ara::core::BasicString([SWS_CORE_03408])的方法 find 从索引位置 pos 开始同步搜索字符串中传入字符序列 s 的首次出现。该行为符合 [basic.string] 中的规范,其中 charT 被替换为 value_type([SWS_CORE_03408])。作为常量成员函数,该调用不会修改调用对象。

  • 参数:s 是指向要搜索的由类型为 value_type 的元素构成的数组的指针;pos 确定搜索的起始索引,默认值为 0([SWS_CORE_03408])。
  • 返回值:找到的位置作为 size_type 返回([SWS_CORE_03408])。
  • 异常安全性:该函数被显式声明为 not exception safe([SWS_CORE_03408])。因此它与针对 StringView([SWS_CORE_03315])和 const BasicString&([SWS_CORE_03407])的重载不同,后者被定义为 noexcept。
  • 并发性与有效性:并发读取访问应该可以在无需同步的情况下进行,而并发写入操作则需要协调(解释:标准容器行为)。 问题 Q-89d9d01f0dd787cd (未决)指针 s 大概必须指向有效的以 null 结尾的序列。

在 ara::core::BasicString 的搜索函数组合中,除了该变体外,还存在带有显式长度限制的重载 n([SWS_CORE_03409])以及对单个字符的搜索([SWS_CORE_03324])。

本段文本由基于 AI 的系统根据 AUTOSAR 规范生成。

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

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

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

函数 find [SWS_CORE_03409]

size_type find (const value_type *s, size_type pos, size_type n) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

类 ara::core::BasicString 的成员函数 find 用于根据 [SWS_CORE_03409] 在字符串内同步搜索字符序列。它从指定位置 pos 开始在实例中搜索传入的类型为 const value_type* 的指针 s 的前 n 个字符,并在匹配时将基于零的索引作为 size_type 返回。

用法与参数

通过头文件 ara/core/string.h 进行调用 [SWS_CORE_03409]。其行为遵循 C++ 标准针对 [basic.string] 的语义,其中 charT 被替换为 value_type [SWS_CORE_03409]。该函数作为 const 方法同步工作,且不会修改现有对象。

错误处理与并发

规范明确将该函数归类为“not exception safe”[SWS_CORE_03409]。推测在内存区域无效或 s 为空指针的情况下,无法保证定义明确的异常处理。 问题 Q-37e3327ae129591d (未决)有效负载中未定义特定的 AUTOSAR 错误代码以及 DET 或 DEM 消息。由于这是一个只读成员函数,只要在同一实例上没有并发写操作发生,多个线程的同时访问应该是可重入的。

相互作用

除此重载外,ara::core::BasicString 还提供替代搜索方法,例如 null 终止变体 find(const value_type* s, size_type pos=0) [SWS_CORE_03408]、单个搜索 find(value_type c, size_type pos=0) [SWS_CORE_03324],以及针对 BasicString [SWS_CORE_03407] 和 StringView [SWS_CORE_03315] 定义为异常安全的重载。对于只读字符序列,ara::core::StringView 中同样提供了异常安全的变体 [SWS_CORE_02159]。

本文字由 AI 创建,且完全基于版本 R25-11 的规范。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03409
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03409@rel:R25-11#2b131bbd
Content hash
2b131bbd
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03409
Status: valid/unmigrated Version: rel:R25-11#9c4c0c86 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_03409@rel:R25-11#9c4c0c86
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

函数 find_first_ [SWS_CORE_03329]

size_type find_first_of (const BasicString &str, size_type pos=0) const noexcept;

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString 的方法 find_first_of 通过头文件 ara/core/string.h 提供,用于在字符串内同步搜索字符 [SWS_CORE_03329]。它从起始位置 pos(默认赋值为 0)开始查找传入字符串 str 中任意字符的首次出现 [SWS_CORE_03329]。其行为遵循 [basic.string] 的语义 [SWS_CORE_03329]。Interpretation:如果不匹配,根据标准行为,返回值应对应于值 npos。 问题 Q-9de908eb4aeaa0a9 (未决)

关于错误处理和异常安全性,该操作被声明为 noexcept 并归类为 exception safe [SWS_CORE_03329]。因此它不抛出异常。载荷中未定义特定开发或生产错误(如 DET 或 DEM 消息)。由于它是一个只读的 const 方法,该调用不会导致实例发生状态更改 [SWS_CORE_03329]。

在 ara::core::BasicString 内的相互作用中,此签名补充了 find_first_of 的其他重载:针对 BasicString 的引用变体是异常安全的 [SWS_CORE_03329],而针对带长度说明的指针 const value_type *s [SWS_CORE_03330] 或以空字符结尾的指针 [SWS_CORE_03331] 以及单个字符 value_type c [SWS_CORE_03332] 的重载均标记为 not exception safe。对于反向搜索未在比较集中出现的第一个字符,同样提供了方法 find_first_not_of,该方法也包含一个异常安全的 BasicString 重载 [SWS_CORE_03337] 以及指针和字符变体 [SWS_CORE_03338]、[SWS_CORE_03339]、[SWS_CORE_03340]。

本文由 AI 系统基于规范文档创建。

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

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

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

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

函数 find_first_ [SWS_CORE_03330]

size_type find_first_of (const value_type *s, size_type pos, size_type n) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

根据 [SWS_CORE_03330],方法 find_first_of 用于在 ara::core::BasicString 的实例内同步搜索来自字符序列中任意字符的首次出现。它通过头文件 ara/core/string.h 提供,并遵循 C++ 标准库针对 [basic.string] 的行为,其中参数类型 charT 被替换为 value_type [SWS_CORE_03330]。

参数与返回值

  • s:指向字符序列(类型 const value_type*)的指针,将搜索其包含的元素。理解:指针 s 应该指向至少包含 n 个元素的有效数组 [SWS_CORE_03330]。 问题 Q-1d6a911b61dc05b4 (未决)
  • pos:字符串内的起始位置,从该位置开始搜索。
  • n:从地址 s 开始需要考虑的字符数量。
  • 返回值:返回类型为 size_type 的首个匹配项的索引。

异常安全性与相关接口

与根据 [SWS_CORE_03329] 针对完整 BasicString 对象的重载(被声明为 noexcept 且异常安全(exception safe))不同,该函数被明确归类为 not exception safe [SWS_CORE_03330]。这同样适用于根据 [SWS_CORE_03331] 未指定长度的重载 n 以及根据 [SWS_CORE_03332] 的单个字符重载。

对于反向搜索目标序列中不存在的字符,可以使用类似的 find_first_not_of 方法,特别是根据 [SWS_CORE_03338] 具有长度限制的指针重载以及变体 [SWS_CORE_03337]、[SWS_CORE_03339] 和 [SWS_CORE_03340]。

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

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

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

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

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

函数 find_first_ [SWS_CORE_03331]

size_type find_first_of (const value_type *s, size_type pos=0) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

使用

类 ara::core::BasicString([SWS_CORE_03331])的方法 find_first_of 用于同步搜索传入字符序列 s 中字符的首次出现。语义对应于 [basic.string] 中的定义,其中 charT 被替换为 value_type([SWS_CORE_03331])。搜索默认从索引 pos = 0 开始。

错误处理与异常安全性

该函数被指定为 not exception safe([SWS_CORE_03331])。规范中未定义特定错误代码(如 DET 或 DEM 消息)。推测在参数错误或内部流程出错时可能会发生异常,而字符串重载 [SWS_CORE_03329] 被声明为 exception safe 和 noexcept。 问题 Q-a28fa9046de1848f (未决)

并发性与限制

作为常量成员函数,该调用不会修改调用实例([SWS_CORE_03331])。由于未传入显式长度参数,指针 s 应该指向有效的以空字符结尾的字符序列,以防止未定义地读取内存区域。 问题 Q-e67d2d456ea47293 (未决)

相互作用

该方法是来自头文件 #include "ara/core/string.h"([SWS_CORE_03331])的 ara::core::BasicString 的搜索接口的一部分:

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

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

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

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

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

函数 find_first_ [SWS_CORE_03332]

size_type find_first_of (value_type c, size_type pos=0) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

根据 [SWS_CORE_03332] 的成员函数 find_first_of 用于查找单个字符在 ara::core::BasicString 实例中的首次出现。其语义与 [basic.string] 中的标准用法一致,唯一的偏差是将 charT 替换为 value_type([SWS_CORE_03332])。该声明通过命名空间 ara::core::BasicString 中的头文件 #include "ara/core/string.h" 提供([SWS_CORE_03332])。

该方法接受类型为 value_type 的所搜索字符 c 以及可选的类型为 size_type 的起始位置 pos(默认值为 0),并返回类型为 size_type 的索引([SWS_CORE_03332])。关于异常处理,该重载被明确归类为非异常安全(not exception safe,[SWS_CORE_03332])。

在 ara::core::BasicString 的搜索函数内的相互作用中,该方法补充了用于字符和子字符串搜索的其他变体:

本使用说明自动生成,完全基于版本 R25-11 的规范数据。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03332
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03332@rel:R25-11#30587d6b
Content hash
30587d6b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03332
Status: valid/unmigrated Version: rel:R25-11#9e91106e 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_03332@rel:R25-11#9e91106e
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

函数 find_first_ [SWS_CORE_03337]

size_type find_first_not_of (const BasicString &str, size_type pos=0) const noexcept;

As per corresponding usage in [basic.string]

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

使用

类 ara::core::BasicString([SWS_CORE_03337],头文件 #include "ara/core/string.h")的成员函数 find_first_not_of 用于在字符串中进行模式搜索。该同步方法期望一个比较字符串 const BasicString &str 以及可选的起始索引 size_type pos = 0 作为参数。根据规范,其语义对应于 [basic.string] 中的用法;作为类型为 size_type 的返回值,该函数应返回从位置 pos 开始未在 str 中出现的第一个字符的索引,若搜索失败则返回 npos。 问题 Q-d3b3fd2d159179e7 (未决)

错误处理

该操作以标识符 noexcept 声明,并在 [SWS_CORE_03337] 中被归类为异常安全(“exception safe”)。该函数未定义特定的错误代码或向 DET 或 DEM 发送的通知。

并发性与限制

作为常量方法(const),该函数不对调用实例进行任何状态更改操作。[SWS_CORE_03337] 中未体现出特定的同步机制或可重入规则。

相互作用

该签名与 ara::core::BasicString 的其他搜索操作相关:

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

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03337
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03337@rel:R25-11#4a3d53fc
Content hash
4a3d53fc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03337
Status: valid/unmigrated Version: rel:R25-11#472ef342 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_03337@rel:R25-11#472ef342
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

函数 find_first_ [SWS_CORE_03338]

size_type find_first_not_of (const value_type *s, size_type pos, size_type n) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

类 ara::core::BasicString([SWS_CORE_03338])的成员函数 find_first_not_of 从指定位置 pos 开始同步搜索字符串,以查找未包含在长度为 n 的传入字符数组 s 中的首个字符。其声明位于头文件 #include "ara/core/string.h" 中。其语义基于 C++ 标准库的标准函数 [basic.string],不同之处在于参数类型 charT 被替换为 value_type([SWS_CORE_03338])。

关于执行上下文和错误行为,指定了以下属性:

  • 返回值:作为 size_type 返回首个不匹配字符的索引([SWS_CORE_03338]);如果未找到不同的字符或 pos 超出有效范围,则类似于 [basic.string] 的标准行为,应该返回值 npos。 问题 Q-2f8c7f7966d5bd41 (未决)
  • 异常安全性:根据规范,该函数被明确归类为 not exception safe([SWS_CORE_03338])。与针对 BasicString 的重载不同,它不具有 noexcept 保证([SWS_CORE_03337])。
  • 指针有效性:指针 s 必须指向包含至少 n 个有效元素的数组;空指针或缓冲区大小不足可能导致未定义行为。 问题 Q-8f794dd917c70631 (未决)

在 ara::core::BasicString 内部的协同配合中,该重载对具有标准空字符终止的搜索([SWS_CORE_03339])、单字符搜索([SWS_CORE_03340])以及相应的正向搜索函数 find_first_of([SWS_CORE_03329]、[SWS_CORE_03330]、[SWS_CORE_03331]、[SWS_CORE_03332])进行了补充。

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

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

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

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

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

函数 find_first_ [SWS_CORE_03339]

size_type find_first_not_of (const value_type *s, size_type pos=0) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

用法:来自头文件 #include "ara/core/string.h" 的类 ara::core::BasicString([SWS_CORE_03339])的方法 find_first_not_of 从位置 pos(默认值为 0)开始,同步搜索未在类型为 const value_type* 的以空字符结尾的字符串 s 中出现的首个字符。该行为对应于 C++ 标准参考 [basic.string],其中 charT 被替换为 value_type([SWS_CORE_03339])。找到的索引位置作为 size_type 返回。

错误处理与边界条件:该元素被明确指定为 not exception safe([SWS_CORE_03339])。未为此函数定义特定错误代码、错误状态的返回值或 AUTOSAR 诊断消息 (DET/DEM)。调用者负责指针 s 的有效性;理解:根据底层 [basic.string] 语义,无效或未以空字符结尾的指针可能会导致未定义行为。 问题 Q-939961ddaec4409f (未决)作为常量成员函数,该方法对于同一实例的并发读取访问是可重入的。

协同工作:该函数是 ara::core::BasicString 搜索接口的一部分。虽然针对完整实例 BasicString 的重载被定义为 noexcept 和 exception safe([SWS_CORE_03337]),但基于指针的变体(例如带有长度限制的搜索 n([SWS_CORE_03338]))以及单字符搜索([SWS_CORE_03340])同样被归类为 not exception safe。用于搜索匹配字符的正向对应项由相应的 find_first_of 重载构成([SWS_CORE_03329]、[SWS_CORE_03330]、[SWS_CORE_03331]、[SWS_CORE_03332])。

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

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

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

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

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

函数 find_first_ [SWS_CORE_03340]

size_type find_first_not_of (value_type c, size_type pos=0) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

用法与语义

来自头文件 ara/core/string.h 的类 ara::core::BasicString([SWS_CORE_03340])的成员函数 find_first_not_of 从起始索引 pos(默认值 0)开始,同步搜索与传入的类型为 value_type 的字符 c 不匹配的首个字符。该行为依据 C++ 标准章节 [basic.string],其中 charT 被替换为 value_type([SWS_CORE_03340])。如果搜索未找到不同的字符,则按照标准约定,返回值应为 npos。 问题 Q-c821d702576e2541 (未决)

错误处理与异常安全性

规范将该函数声明为 not exception safe([SWS_CORE_03340])。负载中既未定义特定 AUTOSAR 错误代码,也未定义 DET 或 DEM 消息。调用者必须考虑到,与被定义为 noexcept 且 exception safe 的字符串重载([SWS_CORE_03337])不同,该函数不保证无异常。

并发性与交互

由于它是一个常量方法(const),因此该调用不会修改字符串;只要不发生写操作,跨多个线程的并发读访问在没有同步的情况下应该也是被允许的。 问题 Q-2d1a22665eafd122 (未决)该函数补充了通过指针([SWS_CORE_03338]、[SWS_CORE_03339])或 BasicString([SWS_CORE_03337])搜索不同子序列的重载,并构成了 find_first_of 方法([SWS_CORE_03329]、[SWS_CORE_03330]、[SWS_CORE_03331]、[SWS_CORE_03332])的对应项。

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

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

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

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

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

函数 find_first_not_of [SWS_CORE_03319]

size_type find_first_not_of (StringView sv, size_type pos=0) const noexcept;

As per corresponding usage in [basic.string]

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

用法与语义

类 ara::core::BasicString([SWS_CORE_03319])的成员函数 find_first_not_of 同步从指定的索引位置 pos 开始搜索字符串。它确定未在传入的 ara::core::StringView sv 中出现的第一个字符。其语义取决于 [basic.string] 的行为([SWS_CORE_03319])。搜索成功时返回匹配位置的基于零的索引,否则返回表示无效位置的值。

错误处理与异常安全性

该函数使用 noexcept 声明,并被指定为异常安全(exception safe)([SWS_CORE_03319])。它不抛出异常,也不生成 DET 或 DEM 等 AUTOSAR 错误报告。如果传入的起始索引位于字符串末尾之后,该操作正常返回未找到匹配项。

并发性与交互

作为非修改性 const 方法,只要不发生对字符串的写访问,对同一实例的并发读访问推测就是线程安全的。 问题 Q-c1bcfdc85bb4769f (未决)在 ara::core::BasicString 内部,它补充了相关的搜索操作,例如 BasicString 的重载([SWS_CORE_03337])以及针对指针和单个字符的变体([SWS_CORE_03338]、[SWS_CORE_03339]、[SWS_CORE_03340])。ara::core::StringView 通过 [SWS_CORE_02173] 在纯视图对象上提供了相应的接口。

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

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03319
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03319@rel:R25-11#8b876f36
Content hash
8b876f36
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03319
Status: valid/unmigrated Version: rel:R25-11#28b9f813 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03319@rel:R25-11#28b9f813
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#bc08cf502026-09-30
  • R19-11rel:R19-11#630f5e4e2026-10-14
  • R20-11rel:R20-11#567bf4be2026-10-14
  • R21-11rel:R21-11#f2670cc22026-10-14
  • R22-11rel:R22-11#1b1f73732026-10-14
  • R23-11rel:R23-11#84bfbd732026-10-14
  • R24-11rel:R24-11#56daf9d42026-10-14
  • R25-11rel:R25-11#28b9f8132026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 find_first_of [SWS_CORE_03317]

size_type find_first_of (StringView sv, size_type pos=0) const noexcept;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

使用

符合 [SWS_CORE_03317] 的类 ara::core::BasicString(在头文件 #include "ara/core/string.h" 中定义)的成员函数 find_first_of 在字符串中同步搜索传入的 StringView 中任意字符的首次出现 sv。搜索默认从索引位置 pos = 0 开始。其行为与 [basic.string] 中的规定相对应,其中 charT 被替换为 value_type。作为返回值,函数以 size_type 类型提供找到的位置;若未找到匹配字符,返回值大概率为 npos(推测:派生自 [basic.string] 的引用标准行为)。 问题 Q-fe0c2b9671e5bd4c (未决)

错误处理与并发

该方法声明为 noexcept,并根据 [SWS_CORE_03317] 视为异常安全(exception safe)。它不抛出异常;未规定特定错误代码或向诊断与监控服务(如 DET 或 DEM)发送消息。由于这是不修改对象状态的读取式 const 操作,无同步的对同一实例的并行调用应当是可重入且线程安全的(推测:无副作用方法的通用语义)。 问题 Q-0657bb5d0d156e3d (未决)

相互作用

在 ara::core::BasicString 内部,该方法补充了针对 const BasicString& [SWS_CORE_03329] 的重载,并允许传递字符串视图而无需额外的内存分配。与被列为非异常安全的指针和字符重载 [SWS_CORE_03330]、[SWS_CORE_03331] 和 [SWS_CORE_03332] 相比,该签名提供了有保证的异常安全性。类似的搜索操作也可直接在 ara::core::StringView 上使用,例如通过 [SWS_CORE_02165]。

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

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03317
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03317@rel:R25-11#a095fc1d
Content hash
a095fc1d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03317
Status: valid/unmigrated Version: rel:R25-11#06edcb29 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03317@rel:R25-11#06edcb29
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#1f25fc232026-09-30
  • R19-11rel:R19-11#4cb9e5e22026-10-14
  • R20-11rel:R20-11#4da551aa2026-10-14
  • R21-11rel:R21-11#003eae7f2026-10-14
  • R22-11rel:R22-11#8bef54f72026-10-14
  • R23-11rel:R23-11#1b622a592026-10-14
  • R24-11rel:R24-11#477ca05a2026-10-14
  • R25-11rel:R25-11#06edcb292026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 find_last_ [SWS_CORE_03333]

size_type find_last_of (const BasicString &str, size_type pos=npos) const noexcept;

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString 的方法 find_last_of 用于在截至位置 pos 的范围内查找传入字符串 str 中某个字符的最后一次出现 [SWS_CORE_03333]。该声明在头文件 ara/core/string.h 中进行,并且行为遵循 [basic.string] 中的相应用法 [SWS_CORE_03333]。Interpretation:来源标注 [basic.string] 大概是指 C++ 标准中关于 std::basic_string 的同名章节。 问题 Q-b62a1b13affb848c (未决)

使用与语义:该调用在 ara::core::BasicString 的实例上作为常量成员函数(const)同步进行 [SWS_CORE_03333]。参数为类型为 const BasicString& 的搜索字符串 str 以及类型为 size_type 的可选起始位置 pos(默认值为 npos)[SWS_CORE_03333]。返回值类型为 size_type,返回找到字符的索引;如果不存在匹配字符,则返回 npos [SWS_CORE_03333]。

错误处理与异常安全性:该重载被明确声明为 noexcept 并归类为 exception safe [SWS_CORE_03333];因此它不抛出异常。

与相关函数的相互作用:除了这种带有 BasicString 的变体外,find_last_of 还存在针对指针 const value_type* [SWS_CORE_03344]、[SWS_CORE_03335] 以及单个字符 value_type [SWS_CORE_03336] 的重载,与本函数不同,它们未被归类为异常安全(not exception safe)。用于搜索未包含在比较字符串中的字符的互补对应项是函数族 find_last_not_of,其 BasicString 变体同样为 noexcept 且异常安全 [SWS_CORE_03341],而其指针和字符重载则声明为 not exception safe [SWS_CORE_03342]、[SWS_CORE_03343]、[SWS_CORE_03344]。

本文自动生成。所有信息均完全基于 AUTOSAR Adaptive R25-11 的规范范围。

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

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

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

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

函数 find_last_ [SWS_CORE_03334]

size_type find_last_of (const value_type *s, size_type pos, size_type n) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

使用

类 ara::core::BasicString([SWS_CORE_03334])的成员函数 find_last_of 用于同步搜索 C 字符串子序列中某一字符的最后一次出现。它定义在头文件 #include "ara/core/string.h" 中([SWS_CORE_03334])。该函数接收指向类型为 const value_type* 的字符数组的指针 s、用于开始向后搜索的起始位置 pos 以及来自 s 的要考虑的字符数量 n([SWS_CORE_03334])。其行为符合标准 [basic.string],其中 charT 被替换为 value_type([SWS_CORE_03334])。最后匹配项的索引作为 size_type 返回([SWS_CORE_03334])。

错误处理与边界条件

该操作指定为 not exception safe([SWS_CORE_03334])。有效负载中未提供特定错误代码、DET 或 DEM 报告。作为常量成员函数,它不修改调用实例([SWS_CORE_03334])。解释:由于该函数处理原始指针 s 以及长度指定 n,调用者应当有责任确保引用的内存范围至少包含 n 个有效字符。 问题 Q-b565ebc283768016 (未决)

相互作用

该函数与 ara::core::BasicString 的其他搜索方法直接相关:

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

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03334
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03334@rel:R25-11#9e313bb2
Content hash
9e313bb2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03334
Status: valid/unmigrated Version: rel:R25-11#3019e049 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_03334@rel:R25-11#3019e049
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

函数 find_last_ [SWS_CORE_03335]

size_type find_last_of (const value_type *s, size_type pos=npos) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

使用

类 ara::core::BasicString([SWS_CORE_03335])的成员函数 find_last_of 通过头文件 #include "ara/core/string.h" 引入。它同步并向后从位置 pos(默认为 npos)开始在字符串中搜索传入序列 s 中任意字符的最后一次出现。其行为对应于 [basic.string] 中的定义,偏差在于 charT 被替换为 value_type([SWS_CORE_03335])。搜索成功时返回索引作为 size_type,否则返回 npos。

异常行为与错误安全性

与使用 noexcept 声明为 exception safe 的字符串引用重载([SWS_CORE_03333])不同,此函数适用 not exception safe 归类([SWS_CORE_03335])。解释:指针 s 应当指向以空字符结尾的字符数组;因此,无效指针或内存范围推测无法被捕获。 问题 Q-fc1a5736ed4628dc (未决)

相互作用与相关函数

规范在 ara::core::BasicString 内部定义了多个相关重载:

本文字由 AI 生成,总结了 AUTOSAR 规范中针对 ara::core::BasicString 的规定。

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

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

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

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

函数 find_last_ [SWS_CORE_03336]

size_type find_last_of (value_type c, size_type pos=npos) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

头文件 #include "ara/core/string.h" 中类 ara::core::BasicString 的同步成员函数 find_last_of 搜索索引位置 pos 处或之前的单个字符 c(类型 value_type)的最后一次出现 [SWS_CORE_03336]。其语义符合 [basic.string] 中的规范,并具有文档记录的偏差:charT 被替换为 value_type [SWS_CORE_03336]。如果找到,该字符的索引将作为 size_type 返回;否则返回 npos [SWS_CORE_03336]。

在错误处理方面,该方法指定为非异常安全(“not exception safe”)[SWS_CORE_03336]。源文档中未指明特定错误代码以及对 DET 或 DEM 的报告。在出错时,内部异常推测会传播给调用者,因为与字符串重载 [SWS_CORE_03333] 不同,该签名未提供 noexcept。 问题 Q-6d19144ce033e676 (未决)

由于它是一个常量成员函数(const),因此不会更改对象的状态 [SWS_CORE_03336]。对同一实例的并发读取访问在没有额外同步的情况下应当是允许的,而同时进行的写入操作则必须进行同步。 问题 Q-5f3aec4dd9c384fd (未决)

该方法融入 ara::core::BasicString 的搜索操作中。它补充了用于搜索 BasicString 对象 [SWS_CORE_03333] 以及带和不带长度限制的指针数组 const value_type* [SWS_CORE_03334]、[SWS_CORE_03335] 的重载。针对不匹配字符的互补对应项由用于单个字符的 find_last_not_of [SWS_CORE_03344] 以及用于字符串和指针的 [SWS_CORE_03341]、[SWS_CORE_03342]、[SWS_CORE_03343] 构成。

本文字由 AI 生成,用作参考指南。始终以官方 AUTOSAR 规范为准。

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

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

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

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

函数 find_last_ [SWS_CORE_03341]

size_type find_last_not_of (const BasicString &str, size_type pos=npos) const noexcept;

As per corresponding usage in [basic.string]

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

来自头文件 ara/core/string.h 的类 ara::core::BasicString([SWS_CORE_03341])的成员函数 find_last_not_of 用于查找与传入字符串中的字符不匹配的最后一个字符。根据规范,其功能行为遵循 [basic.string] [SWS_CORE_03341] 中的相应用法。该方法同步执行,并接受类型为 const BasicString& 的引用 str 以及类型为 size_type 且默认值为 npos 的可选起始位置 pos 作为参数 [SWS_CORE_03341]。返回值类型为 size_type,表示找到的字符的索引 [SWS_CORE_03341]。

在错误处理方面,未定义 DET 或 DEM 报告,也未定义特定错误代码。该方法声明为 noexcept 并具有属性 exception safe [SWS_CORE_03341]。解释:如果无法确定不同的字符,该函数应当类似于 C++ 标准 [basic.string] 返回值 npos。 问题 Q-de6cb50023fa6e38 (未决)

由于它是常量成员函数(const),只要不发生写入操作,对同一字符串实例的并发读取访问应当是无害的。 问题 (未决)在与相关字符串操作的相互作用中,该函数构成了 find_last_of [SWS_CORE_03333] 的对应项。虽然 const BasicString& 的重载是异常安全的 [SWS_CORE_03341],但 find_last_not_of 针对指向 const value_type* 的指针的重载([SWS_CORE_03342]、[SWS_CORE_03343])以及针对单个字符的重载 value_type [SWS_CORE_03344] 明确归类为非异常安全(not exception safe)。

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

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

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

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

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

函数 find_last_ [SWS_CORE_03342]

size_type find_last_not_of (const value_type *s, size_type pos, size_type n) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

类 ara::core::BasicString([SWS_CORE_03342])的成员函数 find_last_not_of 通过头文件 ara/core/string.h 提供。它从位置 pos 开始反向搜索字符串,查找不包含在由指针 s 和数量 n 指定的 value_type 数组中的最后一个字符。其功能语义遵循 [basic.string] 的规定,其中 charT 被替换为 value_type([SWS_CORE_03342])。

错误处理与异常安全性

在规范中,此重载被明确归类为 not exception safe([SWS_CORE_03342])。Interpretation:因此不存在 noexcept 保证,调用者在指针参数无效或发生越界时不得假定其无异常。 问题 Q-3713a1ff523a6051 (未决)

与相关方法的相互作用

该方法归入 ara::core::BasicString 的搜索函数族:

本使用说明基于 AUTOSAR R25-11 规范模型自动整理。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03342
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03342@rel:R25-11#378b0123
Content hash
378b0123
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03342
Status: valid/unmigrated Version: rel:R25-11#112eece2 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_03342@rel:R25-11#112eece2
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

函数 find_last_ [SWS_CORE_03343]

size_type find_last_not_of (const value_type *s, size_type pos=npos) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

使用

类 ara::core::BasicString([SWS_CORE_03343])的成员函数 find_last_not_of 用于在字符串内反向搜索不与以空字符结尾的字符数组 s 中包含的任何字符匹配的最后一个字符。pos 用作可选的起始索引,默认设置为 npos。其语义遵循 [basic.string] 的规定,其中 charT 被替换为 value_type([SWS_CORE_03343])。要引入该函数,需要头文件 ara/core/string.h([SWS_CORE_03343])。

错误处理与异常安全性

与被指定为 noexcept(“exception safe”)的字符串重载 [SWS_CORE_03341] 相反,此指针重载被明确归类为“not exception safe”([SWS_CORE_03343])。未为此函数定义特定的 DET 或 DEM 错误消息。由于对 [basic.string] 的引用未规定单独的 AUTOSAR 错误检查,因此提供有效的、以空字符结尾的指针 s 应当完全由调用者负责。 问题 Q-0b923cab35c7bf41 (未决)

相互作用与重载

在 ara::core::BasicString 内,该函数属于一组相关的搜索操作:

此文本根据规范自动生成。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03343
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03343@rel:R25-11#77faed5b
Content hash
77faed5b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03343
Status: valid/unmigrated Version: rel:R25-11#45c93c85 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_03343@rel:R25-11#45c93c85
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

函数 find_last_ [SWS_CORE_03344]

size_type find_last_not_of (value_type c, size_type pos=npos) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

类 ara::core::BasicString([SWS_CORE_03344],在 #include "ara/core/string.h" 中声明)的成员函数 find_last_not_of 同步反向搜索字符串中不等于传入字符 c 的最后一个元素。搜索的起始索引通过参数 pos 控制,其默认预设为 npos。执行遵循规范 [basic.string],其中 charT 被替换为 value_type [SWS_CORE_03344]。解释:如果无法确定不同的字符,该函数可能返回 npos。 问题 Q-0db95220d1766e88 (未决)

在错误处理方面,该函数在规范中被明确归类为非异常安全(not exception safe)[SWS_CORE_03344]。载荷中未定义特定的错误代码或机制(如 DET 或 DEM 消息)。

由于该方法被声明为 const,因此它不会修改对象 [SWS_CORE_03344]。只要不发生并发写操作,对同一字符串实例的并发读访问无需状态更改即可同步进行。

在 ara::core::BasicString 内,该函数与其他搜索操作相结合:

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

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

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

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

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

函数 find_last_not_of [SWS_CORE_03320]

size_type find_last_not_of (StringView sv, size_type pos=npos) const noexcept;

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString 的方法 [SWS_CORE_03320] 可通过头文件 <ara/core/string.h> 获取。它执行同步反向查找,并确定字符串中最后一个未在传入视图 sv 中出现的字符的索引。搜索范围从 pos 开始,其默认值为 npos。其行为遵循 [basic.string] 的语义;如果未找到不同字符,该函数推测会返回值 npos。 问题 Q-1f2c9efc73c41b7a (未决)

关于错误处理,该函数被指定为 noexcept 并被归类为 exception safe [SWS_CORE_03320]。因此它不会抛出异常。该操作不存在特定的 AUTOSAR 错误码或发往错误通道(DET/DEM)的消息。

作为非修改性的 const 方法,该调用不会更改字符串的状态。因此,多个线程对同一实例的并发读取访问在无需外部同步的情况下可能是安全的,而并发修改则必须加以保护。 问题 Q-227382d5787bde14 (未决)

该函数接受类型为 ara::core::StringView 的参数,从而可以在无需内存分配的情况下进行高效比较。在 ara::core::BasicString 内部,它补充了针对字符串 [SWS_CORE_03341]、原生指针 [SWS_CORE_03342]、[SWS_CORE_03343] 以及单个字符 [SWS_CORE_03344] 的重载。与指针和字符变体不同,StringView 重载是异常安全的。对应的搜索函数同样存在于 ara::core::StringView 本身 [SWS_CORE_02177]、[SWS_CORE_02178]、[SWS_CORE_02179]、[SWS_CORE_02180]。

本使用说明由人工智能生成。所有技术信息均基于 AUTOSAR 有效负载的要求。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03320
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03320@rel:R25-11#aa66f19f
Content hash
aa66f19f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03320
Status: valid/unmigrated Version: rel:R25-11#c54cab32 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03320@rel:R25-11#c54cab32
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#8da76b592026-09-30
  • R19-11rel:R19-11#5f40bcec2026-10-14
  • R20-11rel:R20-11#e1c2eb632026-10-14
  • R21-11rel:R21-11#a98ca3792026-10-14
  • R22-11rel:R22-11#54339bbe2026-10-14
  • R23-11rel:R23-11#549b390c2026-10-14
  • R24-11rel:R24-11#ff50b3cd2026-10-14
  • R25-11rel:R25-11#c54cab322026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 find_last_of [SWS_CORE_03318]

size_type find_last_of (StringView sv, size_type pos=npos) const noexcept;

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString([SWS_CORE_03318])的成员函数 find_last_of 在字符串中反向搜索传入的 StringView sv 中所包含字符的最后一次出现。搜索同步进行,从指定位置 pos 或其之前开始,该位置默认赋值为 npos。根据对 [basic.string] 的引用,函数大概率返回所找到字符的从零开始的索引,若不存在匹配字符则返回 npos。 问题 Q-bf5de9d8aa553a74 (未决)

关于错误处理,该操作声明为 noexcept 并归类为 exception safe([SWS_CORE_03318])。因此,调用方可以确信在搜索过程中不会抛出异常。对于此基础辅助函数,未规定特定的错误代码或通过 DET 或 DEM 发送错误消息。

由于这是不改变对象状态的常量成员函数(const),只要不发生竞争性写入访问,同一实例上的并发读取访问应当是无顾虑的。 问题 (未决)

在字符串类族中,该重载与其针对 const BasicString& 的变体([SWS_CORE_03333])具有相同的异常安全性。与此相反,基于裸指针和单字符的重载([SWS_CORE_03334]、[SWS_CORE_03335]、[SWS_CORE_03336])被指定为 not exception safe。类似的搜索函数也可在 ara::core::StringView 中使用([SWS_CORE_02169]、[SWS_CORE_02170]、[SWS_CORE_02171]、[SWS_CORE_02172]),且这些函数还被标记为 constexpr。

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

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03318
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03318@rel:R25-11#91647340
Content hash
91647340
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03318
Status: valid/unmigrated Version: rel:R25-11#87aa553d Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03318@rel:R25-11#87aa553d
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#4302dfdc2026-09-30
  • R19-11rel:R19-11#52aa69b42026-10-14
  • R20-11rel:R20-11#1a4b36ea2026-10-14
  • R21-11rel:R21-11#be0d2f602026-10-14
  • R22-11rel:R22-11#d8d40e182026-10-14
  • R23-11rel:R23-11#50ae25f02026-10-14
  • R24-11rel:R24-11#26c417aa2026-10-14
  • R25-11rel:R25-11#87aa553d2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 front [SWS_CORE_03065]

reference front ();

As per corresponding usage in [basic.string]

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

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

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

函数 front [SWS_CORE_03066]

const_reference front () const;

As per corresponding usage in [basic.string]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03066
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03066@rel:R25-11#6184a0a8
Content hash
6184a0a8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03066
Status: valid/unmigrated Version: rel:R25-11#336f9071 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_03066@rel:R25-11#336f9071
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

函数 get_allocator [SWS_CORE_03415]

allocator_type get_allocator () const noexcept;

As per corresponding usage in [basic.string]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03415
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03415@rel:R25-11#207a9ad3
Content hash
207a9ad3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03415
Status: valid/unmigrated Version: rel:R25-11#214aa0dc 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_03415@rel:R25-11#214aa0dc
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

函数 insert [SWS_CORE_03093]

BasicString & insert (size_type pos, const BasicString &str);

As per corresponding usage in [basic.string]

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

ara::core::BasicString([SWS_CORE_03093])的成员函数 insert 用于在指定位置同步插入字符串。它需要类型为 size_type 的索引 pos 以及指向待插入 BasicString 对象的常量引用 str,并返回指向已修改实例的引用([SWS_CORE_03093])。其功能行为遵循 [basic.string]([SWS_CORE_03093])中的相应语义。

规范未为该函数定义特定的错误码以及向 DET 或 DEM 发送的消息。它在规范中被明确归类为“not exception safe”([SWS_CORE_03093])。如果在插入过程或必要的内存分配期间发生错误,则对象的内部状态可能不会获得任何异常安全保证(解释)。 问题 Q-7c9b0483885688ae (未决)

调用在调用者的上下文中同步执行。在多个线程对同一个字符串实例进行并发读写访问时,若没有外部同步,则可能不具备线程安全性(解释)。 问题 Q-5fc68a1ccad5b75b (未决)

这种行为与 AUTOSAR Adaptive 容器的规范模式保持一致:在相关容器(如 ara::core::Vector([SWS_CORE_01367])或 ara::core::Map([SWS_CORE_01460]))中,insert 重载同样参考了相应的 C++ 标准容器,并一致被标识为非异常安全。

本段文本由人工智能系统生成,仅供参考,不具有约束力。

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

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

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

函数 insert [SWS_CORE_03094]

BasicString & insert (size_type pos1, const BasicString &str, size_type pos2, size_type n=npos);

As per corresponding usage in [basic.string] except for the following deviations: 1. if ( pos1 > size() || pos2 > str.size() ) IsoStdOutOfRangeViolation is raised instead of std::out_of_range

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

用法与调用上下文

类 ara::core::BasicString([SWS_CORE_03094])的成员函数 insert 将源字符串的子字符串插入到当前字符串中。它通过头文件 ara/core/string.h 提供([SWS_CORE_03094])。作为实参,该函数接收插入索引 pos1、源引用 str、str 内的起始索引 pos2 以及可选的要插入的字符数 n(默认值为 npos)([SWS_CORE_03094])。返回值是对修改后的 BasicString 对象的引用([SWS_CORE_03094])。

错误处理与异常安全性

该行为原则上遵循标准库 [basic.string],但存在特定偏差:如果 pos1 > size() 或 pos2 > str.size() 成立,则会触发 IsoStdOutOfRangeViolation 而非 std::out_of_range([SWS_CORE_03094])。该操作被指定为非异常安全(not exception safe)([SWS_CORE_03094])。因此,如果发生错误,无法确保对象仍保持在有效的初始状态。

并发性与限制

解释:由于方法调用直接修改目标实例且未提及同步属性,因此在并发访问同一实例时,该函数推测既不是可重入的也不是线程安全的。 问题 Q-6727ae094800c27a (未决)调用方必须对并发访问进行外部同步。

与相关容器的交互

相应的 insert 函数也存在于其他 AUTOSAR 容器中,例如 ara::core::Vector([SWS_CORE_01367]、[SWS_CORE_01369])和 ara::core::Map([SWS_CORE_01460]、[SWS_CORE_01468])。这些重载主要使用基于位置的迭代器或节点,而本字符串操作则基于索引工作;所有实现的共同点是均排除了异常安全性([SWS_CORE_03094]、[SWS_CORE_01367]、[SWS_CORE_01460])。

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

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception 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_03094
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03094@rel:R25-11#ec71beb1
Content hash
ec71beb1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03094
Status: valid/unmigrated Version: rel:R25-11#b641bba3 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_03094@rel:R25-11#b641bba3
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

函数 insert [SWS_CORE_03095]

BasicString & insert (size_type pos, const value_type *s, size_type n);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type 2. if ( pos1 > size() ) IsoStdOutOfRangeViolation is raised instead of std:: out_of_range 3. if ( size() + n > max_size() ) IsoStdLengthErrorViolation is raised instead of std::length_error

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

类 ara::core::BasicString 的成员函数 insert([SWS_CORE_03095],通过头文件 ara/core/string.h 提供)同步将指针 s(类型 const value_type*)中由 n 个字符组成的字符序列从基于零的索引位置 pos 插入到现有字符串中。其行为遵循 [basic.string] 的语义,其中 charT 被 value_type 替换。作为返回值,该函数返回对调用方 BasicString 对象的引用,从而支持链式调用 [SWS_CORE_03095]。

错误处理与边界条件

实现触发 AUTOSAR 特定的 violations,而不是标准 C++ 异常 [SWS_CORE_03095]:

  • 如果插入位置位于字符串末尾之后(条件 pos > size();在规范文本中称为 pos1 > size()),则触发 IsoStdOutOfRangeViolation 而非 std::out_of_range [SWS_CORE_03095]。
  • 如果插入后的总大小超过允许的最大值(size() + n > max_size()),则触发 IsoStdLengthErrorViolation 而非 std::length_error [SWS_CORE_03095]。

并发性与交互

该操作被指定为 not exception safe [SWS_CORE_03095]。解释:对同一 BasicString 实例的并行修改访问推测不是线程安全的,因此需要外部同步保护。 问题 Q-0c81a6b19e4c5c7b (未决)与基于迭代器工作并返回迭代器的相关容器操作(如 ara::core::Vector::insert [SWS_CORE_01367] 或 ara::core::Map::insert [SWS_CORE_01460])不同,此处的定位是通过索引基于索引进行的。

本使用说明由系统自动生成,基于 AUTOSAR Adaptive R25-11。

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception safe
Verletzungen (Violations)IsoStdLengthEr- Description as per std::length_error rorViolation 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_03095
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03095@rel:R25-11#e216a9ae
Content hash
e216a9ae
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03095
Status: valid/unmigrated Version: rel:R25-11#4e72a65a 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_03095@rel:R25-11#4e72a65a
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

函数 insert [SWS_CORE_03096]

BasicString & insert (size_type pos, const value_type *s);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

使用

类 ara::core::BasicString 的成员函数 insert 将以 null 结尾的字符数组从位置 pos 开始插入到现有字符串对象中([SWS_CORE_03096])。通过头文件 ara/core/string.h 进行声明([SWS_CORE_03096])。功能行为符合根据 [basic.string] 的标准用法,具体差异在于字符类型 charT 被替换为 value_type([SWS_CORE_03096])。执行同步进行,并返回对修改后实例的引用([SWS_CORE_03096])。

错误处理与并发

该接口被明确指定为非异常安全(not exception safe)([SWS_CORE_03096])。未为此函数定义特定的错误代码、用于错误指示的返回值或发往 DET 或 DEM 的消息。传入的指针 s 大概必须指向有效的以 null 结尾的数组,因为不会捕获无效的内存访问或重新分配时的错误。 问题 Q-071709eb5beba24b (未决)在并行访问时,对同一实例的修改性调用可能不是线程安全的,需要进行外部同步。

相互作用

该操作融入了 ara::core 的统一接口设计中。类似的 insert 重载存在于 ara::core::Vector([SWS_CORE_01367]、[SWS_CORE_01368]、[SWS_CORE_01370])以及 ara::core::Map(带有符合 [SWS_CORE_01418] 的 insert_return_type 的 [SWS_CORE_01460]、[SWS_CORE_01468])中,它们也始终被声明为非异常安全。

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

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

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

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

函数 insert [SWS_CORE_03097]

BasicString & insert (size_type pos, size_type n, value_type c);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

使用与签名

类 ara::core::BasicString 的成员函数 insert 通过头文件 #include "ara/core/string.h" 提供 [SWS_CORE_03097]。它用于在字符位置 pos 同步插入 n 个连续的类型为 value_type 的字符 c:

BasicString & insert (size_type pos, size_type n, value_type c);

该函数返回对调用方 BasicString 对象的引用,从而支持链式操作。该语义对应于针对 [basic.string] 的规定,唯一的偏差是类型参数 charT 被替换为 value_type [SWS_CORE_03097]。

错误处理与并发

关于异常安全性,该函数被明确归类为 not exception safe [SWS_CORE_03097]。未定义具体的错误代码、AUTOSAR 返回值或发往 DET/DEM 的消息。解释:如果内部内存分配失败或 pos 超出字符串的有效范围,则由于未指定任何恢复保证,实例可能会保持在不一致状态。 问题 (未决)

关于并发性,规范不包含任何同步机制。解释:对 ara::core::BasicString 的同一实例进行 insert 的修改性调用可能不是线程安全的,在并行访问时需要外部保护。 问题 Q-9e2bbadca2f58f9a (未决)

core 模块内的协作

该函数跻身于 ara::core 数据结构的接口之列:

  • 对于动态数组,ara::core::Vector 提供了类似的 insert 重载(例如用于插入多个元素 [SWS_CORE_01369] 或单个元素 [SWS_CORE_01367]),这些重载同样被声明为非异常安全。
  • 像 ara::core::Map 这样的关联容器在采用相同异常行为的情况下定义了类似的插入操作 [SWS_CORE_01460]。

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

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

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

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

函数 insert [SWS_CORE_03098]

iterator insert (const_iterator p, value_type c);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

使用与签名

类 ara::core::BasicString 的成员函数 insert 通过头文件 #include "ara/core/string.h" 提供 [SWS_CORE_03098]。它接收类型为 const_iterator 的迭代器 p 以及类型为 value_type 的字符 c,并返回 iterator [SWS_CORE_03098]。功能语义遵循 [basic.string] 中的规定,其中 charT 被替换为 value_type [SWS_CORE_03098]。解释:返回的迭代器大概指向在位置 p 处新插入的字符。 问题 Q-077bda6c9d78be47 (未决)

错误处理与限制

关于异常安全性,该操作被声明为“not exception safe”[SWS_CORE_03098]。规范中未规定特定的错误代码以及发往 DET 或 DEM 的消息;解释:如果执行过程中发生错误,可能对字符串对象的状态不存在任何保证。 问题 Q-f477ec410287f50a (未决)

与相关容器的交互

插入操作的模式以及归类为“not exception safe”符合 ara::core 中其他容器的标准:

本段文本由 AI 系统基于规范要求生成。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03098
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03098@rel:R25-11#8a69ede5
Content hash
8a69ede5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03098
Status: valid/unmigrated Version: rel:R25-11#288efbcf 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_03098@rel:R25-11#288efbcf
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

函数 insert [SWS_CORE_03099]

iterator insert (const_iterator p, size_type n, value_type c);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

类 ara::core::BasicString([SWS_CORE_03099])的方法 insert 用于在字符串的定义位置同步插入多个相同字符。通过头文件 #include "ara/core/string.h" 引入。

用法与参数

按照 [basic.string] 的语义通过签名 iterator insert(const_iterator p, size_type n, value_type c) 进行调用,其中 charT 被替换为 value_type([SWS_CORE_03099]):

  • p:内容插入在其前面的位置(const_iterator)的迭代器。
  • n:要插入的字符数(size_type)。
  • c:要插入的类型为 value_type 的字符值。

作为返回值,该函数提供指向首个新插入字符或位置 p 的 iterator。

错误处理与边界条件

规范明确将该操作归类为非异常安全(“not exception safe”)([SWS_CORE_03099])。Payload 中未定义具体的错误代码、DET 或 DEM 消息。解释:由于缺乏异常保证,必要内存分配的失败大概会直接导致执行中止或处于不一致状态。 问题 Q-9adc31e2e79f76fd (未决)

相互作用

该接口遵循 AUTOSAR 顺序容器的一般提供模式。对于 ara::core::Vector([SWS_CORE_01369]),存在一个功能等价的用于多次插入的重载,该重载同样被指定为非异常安全。与此不同的是,像 ara::core::Map 这样的关联容器主要使用基于对或基于节点的接口([SWS_CORE_01460]、[SWS_CORE_01468])。

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

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

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

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

函数 insert [SWS_CORE_03100]

template <class InputIterator> iterator insert (const_iterator p, InputIterator first, InputIterator last);

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString([SWS_CORE_03100])的模板函数 insert(在头文件 ara/core/string.h 中声明)在迭代器位置 p 同步将由输入迭代器 first 和 last 定义的序列插入到字符串中。其行为以及返回的 iterator 取决于 C++ 标准库 [basic.string] 中的相应定义 [SWS_CORE_03100]。

关于错误处理,该函数被明确归类为 not exception safe [SWS_CORE_03100]。规范既未规定特定的错误代码,也未规定 DET 或 DEM 消息。如果在插入过程中发生错误(例如内存分配失败),大概不会恢复实例的原始状态,且该操作可能不提供事务安全性。 问题 (未决)

关于并发性,该方法在同一实例上不是可重入的;没有外部同步的并发访问大概会导致数据争用。 问题 Q-6b99b21f80d01f8a (未决)此外,由于可能的重新分配或元素移动,对字符串的现有迭代器和引用可能会失效。

这种模式符合 AUTOSAR Adaptive Core 的统一接口设计:insert 的基于范围的重载类似地存在于 ara::core::Vector([SWS_CORE_01370])和 ara::core::Map([SWS_CORE_01466])中,它们同样参考了标准容器并被声明为非异常安全。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03100
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03100@rel:R25-11#74470a32
Content hash
74470a32
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03100
Status: valid/unmigrated Version: rel:R25-11#2606fcb3 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_03100@rel:R25-11#2606fcb3
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

函数 insert [SWS_CORE_03101]

iterator insert (const_iterator p, std::initializer_list< value_type >);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

用法与语义

类 ara::core::BasicString 的成员函数 insert 在由迭代器 p(类型为 const_iterator)指示的位置之前插入 std::initializer_list<value_type> 的内容,并返回指向首个插入元素的 iterator [SWS_CORE_03101]。该声明通过头文件 ara/core/string.h 提供 [SWS_CORE_03101]。功能语义符合 C++ 标准库中 [basic.string] 的规定,其中 charT 被替换为 value_type [SWS_CORE_03101]。

错误处理与异常安全性

规范未定义具体的错误代码、针对错误情况的返回值或发往 DET 或 DEM 的通知。异常安全性被明确规定为 not exception safe [SWS_CORE_03101]。如果内部操作(例如内存分配)失败,该实现不为字符串的状态提供一致性保证。

并发性与限制

该操作在调用线程的上下文中同步执行。解释:由于规范未提供内部同步机制,因此在没有外部同步的情况下,对 ara::core::BasicString 的同一实例进行并发修改访问可能不是线程安全的。 问题 Q-11ec8e3ae2b8cf90 (未决)

模块内的相互作用

通过初始化列表插入元素在模块 core 中遵循一致的模式:

  • 除了针对单值和迭代器范围的重载 [SWS_CORE_01367] [SWS_CORE_01370] 之外,ara::core::Vector 还通过 iterator insert(const_iterator, std::initializer_list<T>) 提供了类似的插入函数 [SWS_CORE_01371]。
  • ara::core::Map 同样通过 void insert(std::initializer_list<value_type>) 提供批量插入操作 [SWS_CORE_01467],与字符串变体一样,该操作被归类为 not exception safe。

本段文本由自动生成。所有专业信息均基于 AUTOSAR Release R25-11。

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

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

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

函数 insert [SWS_CORE_03310]

BasicString & insert (size_type pos, StringView sv);

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString([SWS_CORE_03310])的成员函数 insert 在指定的索引位置(size_type pos)将字符串视图(StringView sv)的内容同步插入到字符串中。根据 [SWS_CORE_03310],该语义符合 [basic.string] 中的规范。该函数返回对修改后字符串的引用(BasicString &),这允许链接多个操作。

使用时需包含头文件 #include "ara/core/string.h"([SWS_CORE_03310])。关于异常处理,该操作被明确指定为非异常安全(not exception safe)([SWS_CORE_03310])。如果在插入或内部内存分配期间发生错误,则对对象的状态不具备异常安全性保证。

关于可重入性和并发性,在没有外部同步的情况下,同时访问同一实例时该方法可能不是线程安全的。 问题 Q-9b667a676acb9f5d (未决)此行为与 ara::core 中的其他容器操作相对应,其中诸如 ara::core::Vector([SWS_CORE_01367]、[SWS_CORE_01368]、[SWS_CORE_01369]、[SWS_CORE_01370]、[SWS_CORE_01371])和 ara::core::Map([SWS_CORE_01460]、[SWS_CORE_01468])中的修改性插入函数同样被定义为非异常安全。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03310
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03310@rel:R25-11#46ad1af7
Content hash
46ad1af7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03310
Status: valid/unmigrated Version: rel:R25-11#a9000c7b Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03310@rel:R25-11#a9000c7b
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#c39449eb2026-09-30
  • R19-11rel:R19-11#0e0267ea2026-10-14
  • R20-11rel:R20-11#77ccaff42026-10-14
  • R21-11rel:R21-11#205dc51e2026-10-14
  • R22-11rel:R22-11#d9b3549e2026-10-14
  • R23-11rel:R23-11#dc8286112026-10-14
  • R24-11rel:R24-11#1a955fe62026-10-14
  • R25-11rel:R25-11#a9000c7b2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 insert [SWS_CORE_03311]

template <class T> BasicString & insert (size_type pos1, const T &t, size_type pos2, size_type n=npos);

As per corresponding usage in [basic.string] except for the following deviations: 1. if ( pos1 > size() || pos2 > sv.size() ) IsoStdOutOfRangeViolation is raised instead of std::out_of_range

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

用法与调用上下文

类 ara::core::BasicString([SWS_CORE_03311])的模板函数 insert 在位置 pos1 将来自对象 t 的字符序列同步插入到现有字符串中。通过 pos2 和可选的长度说明 n(默认为 npos)确定要读取的 t 的子区域。作为返回值,该函数返回对修改后的 BasicString 对象的引用(*this)。在此源对象 t 大概被解释为 std::string_view 或类型兼容的类字符对象,因为规范参考了 sv.size()。 问题 Q-d3ce468fb83c3519 (未决)

错误处理与异常行为

该函数在错误处理方面特意偏离了 ISO C++ 标准:如果 pos1 超过目标字符串的长度(pos1 > size())或 pos2 超过源区域的长度(pos2 > sv.size()),则引发 IsoStdOutOfRangeViolation 而不是 std::out_of_range([SWS_CORE_03311])。规范还将该函数归类为非异常安全(not exception safe)([SWS_CORE_03311]),因此在发生内存错误时,可能无法保证保留原始对象状态。 问题 Q-e1feaf7fe13a8b16 (未决)

并发性与交互

由于缺乏明确的可重入性规范,对同一实例进行未受保护的并行写入或读取访问可能不是线程安全的。 问题 (未决)与诸如 ara::core::Vector([SWS_CORE_01367])或 ara::core::Map([SWS_CORE_01460])之类的其他核心容器相比(其 insert 函数基于迭代器工作并且同样被视为非异常安全),BasicString::insert 基于索引工作并集成了 AUTOSAR 特定的违规概念([SWS_CORE_03311])。

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

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception 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_03311
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03311@rel:R25-11#b06c362d
Content hash
b06c362d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03311
Status: valid/unmigrated Version: rel:R25-11#62bf1049 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03311@rel:R25-11#62bf1049
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#ba5ad97d2026-09-30
  • R19-11rel:R19-11#6faf2c3a2026-10-14
  • R20-11rel:R20-11#cce541312026-10-14
  • R21-11rel:R21-11#52705dfb2026-10-14
  • R22-11rel:R22-11#f89e0cc72026-10-14
  • R23-11rel:R23-11#a74846012026-10-14
  • R24-11rel:R24-11#944e7ad42026-10-14
  • R25-11rel:R25-11#62bf10492026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 length [SWS_CORE_03060]

size_type length () const noexcept;

As per corresponding usage in [basic.string]

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

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

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

函数 max_size [SWS_CORE_03053]

size_type max_size () const noexcept;

As per corresponding usage in [basic.string]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03053
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03053@rel:R25-11#ba664fed
Content hash
ba664fed
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03053
Status: valid/unmigrated Version: rel:R25-11#d990acd1 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_03053@rel:R25-11#d990acd1
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_03021] Upstream: RS_AP_00145

BasicString & operator= (const BasicString &str);

As per corresponding usage in [basic.string]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03021
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03021@rel:R25-11#db5fe299
Content hash
db5fe299
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03021
Status: valid/unmigrated Version: rel:R25-11#50cfd10d 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_03021@rel:R25-11#50cfd10d
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_03023] Upstream: RS_AP_00145

BasicString & operator= (BasicString &&str) noexcept(std::allocator_ traits< Allocator >::propagate_on_container_move_ assignment::value||std::allocator_traits< Allocator >::is_always_ equal::value);

As per corresponding usage in [basic.string]

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitconditionally exception safe

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

Record
AUTOSAR/AP/record/SWS_CORE_03023
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03023@rel:R25-11#51363567
Content hash
51363567
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03023
Status: valid/unmigrated Version: rel:R25-11#29f6fade 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_03023@rel:R25-11#29f6fade
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_03035]

BasicString & operator= (const value_type *s);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03035
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03035@rel:R25-11#41590a14
Content hash
41590a14
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03035
Status: valid/unmigrated Version: rel:R25-11#3fee66aa 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_03035@rel:R25-11#3fee66aa
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_03036]

BasicString & operator= (value_type c);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03036
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03036@rel:R25-11#c6266d1c
Content hash
c6266d1c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03036
Status: valid/unmigrated Version: rel:R25-11#290a89a8 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_03036@rel:R25-11#290a89a8
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_03037]

BasicString & operator= (std::initializer_list< value_type >);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03037
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03037@rel:R25-11#28d9b061
Content hash
28d9b061
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03037
Status: valid/unmigrated Version: rel:R25-11#b37500aa 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_03037@rel:R25-11#b37500aa
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_03304]

BasicString & operator= (StringView sv);

As per corresponding usage in [basic.string]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03304
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03304@rel:R25-11#00c2eabf
Content hash
00c2eabf
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03304
Status: valid/unmigrated Version: rel:R25-11#e1480f61 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03304@rel:R25-11#e1480f61
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#c5d4e70d2026-09-30
  • R19-11rel:R19-11#9f3c52e32026-10-14
  • R20-11rel:R20-11#d5f95de02026-10-14
  • R21-11rel:R21-11#f3556bbd2026-10-14
  • R22-11rel:R22-11#c0297a6d2026-10-14
  • R23-11rel:R23-11#f43a1fe02026-10-14
  • R24-11rel:R24-11#cfaf14ed2026-10-14
  • R25-11rel:R25-11#e1480f612026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 operatorStringView [SWS_CORE_03301]

operator StringView () const noexcept;

As per corresponding usage in [basic.string]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03301
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03301@rel:R25-11#e6133596
Content hash
e6133596
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03301
Status: valid/unmigrated Version: rel:R25-11#50dddbb9 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03301@rel:R25-11#50dddbb9
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#9f4795fb2026-09-30
  • R19-11rel:R19-11#f0d4c1a12026-10-14
  • R20-11rel:R20-11#ce78af432026-10-14
  • R21-11rel:R21-11#1e26e6ad2026-10-14
  • R22-11rel:R22-11#fa8cc98d2026-10-14
  • R23-11rel:R23-11#005096c22026-10-14
  • R24-11rel:R24-11#ba5a934e2026-10-14
  • R25-11rel:R25-11#50dddbb92026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 operator[] [SWS_CORE_03061]

reference operator[] (size_type n);

As per corresponding usage in [basic.string]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03061
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03061@rel:R25-11#8e18e53d
Content hash
8e18e53d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03061
Status: valid/unmigrated Version: rel:R25-11#c271c4dd 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_03061@rel:R25-11#c271c4dd
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_03062]

const_reference operator[] (size_type n) const;

As per corresponding usage in [basic.string]

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

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

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

函数 pop_back [SWS_CORE_03105]

void pop_back ();

As per corresponding usage in [basic.string]

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

ara::core::BasicString([SWS_CORE_03105])的成员函数 pop_back 通过头文件 #include "ara/core/string.h" 提供。它具有签名 void pop_back(),不接收传入参数且不返回返回值。根据规范,其行为与 [basic.string] 中的相应使用一致([SWS_CORE_03105])。解释:与 [basic.string] 一致,该操作推测应同步从字符串中移除最后一个字符。 问题 Q-857ed5f71128639e (未决)

关于错误处理和鲁棒性,该函数被归类为 not exception safe([SWS_CORE_03105])。未为此接口定义特定的错误代码或诊断报告(如 DET 或 DEM)。调用方在执行前必须确保字符串处于有效状态且非空,因为在发生错误时无法保证异常安全性。

在模块 core 中,对于顺序数据结构存在类似的协作:来自 ara/core/vector.h 的类 ara::core::Vector 同样提供了成员函数 pop_back([SWS_CORE_01365])。该函数遵循 [vector] 中的相应用法,并在归类为 not exception safe 时具有关于异常安全性的相同限制([SWS_CORE_01365])。

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

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

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

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

函数 push_ [SWS_CORE_03083]

void push_back (value_type c);

As per corresponding usage in [basic.string]

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

使用

函数 push_(带有签名 void push_back (value_type c);)属于类 ara::core::BasicString,用于同步地向现有字符串 [SWS_CORE_03083] 追加类型为 value_type 的字符 c。声明通过头文件 #include "ara/core/string.h" 提供 [SWS_CORE_03083]。在技术实现上,该功能以 C++ 标准构造 [basic.string] 的相应用法为基准 [SWS_CORE_03083]。

错误处理

由于返回值为 void [SWS_CORE_03083],规范未针对该元素定义特定的错误代码、返回值或诊断消息。关于异常安全性,该操作被明确归类为 not exception safe [SWS_CORE_03083]。

并发性与限制

由于添加字符会更改实例的状态,且未规范同步机制,因此在没有外部保护的情况下对同一实例的并发调用大概率不是线程安全的。 问题 Q-d8277d8d29821e14 (未决)调用方软件组件必须在需要时自行协调访问。

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

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

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

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

函数 rbegin [SWS_CORE_03043]

reverse_iterator rbegin () noexcept;

As per corresponding usage in [basic.string]

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

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

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

函数 rbegin [SWS_CORE_03044]

const_reverse_iterator rbegin () const noexcept;

As per corresponding usage in [basic.string]

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

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

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

函数 rend [SWS_CORE_03045]

reverse_iterator rend () noexcept;

As per corresponding usage in [basic.string]

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

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

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

函数 rend [SWS_CORE_03046]

const_reverse_iterator rend () const noexcept;

As per corresponding usage in [basic.string]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03046
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03046@rel:R25-11#61539c55
Content hash
61539c55
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03046
Status: valid/unmigrated Version: rel:R25-11#060b985c 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_03046@rel:R25-11#060b985c
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

函数 replace [SWS_CORE_03106]

BasicString & replace (size_type pos1, size_type n1, const BasicString &str);

As per corresponding usage in [basic.string]

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

类 ara::core::BasicString([SWS_CORE_03106],在 #include "ara/core/string.h" 中声明)的成员函数 replace 从索引 pos1 开始,同步将长度为 n1 个字符的当前字符串局部区域替换为传入的 BasicString 的内容 str。其语义遵循 C++ 标准库 [basic.string] 中的相应定义 [SWS_CORE_03106]。返回值提供对已修改对象(BasicString &)的引用,从而允许方法链式调用 [SWS_CORE_03106]。

关于错误处理和异常安全性,该函数被明确归类为 not exception safe [SWS_CORE_03106]。如果在执行期间发生错误(例如内存不足),则操作无法保证确定的初始状态。与指明特定 AUTOSAR 违例(如 IsoStdOutOfRangeViolation 或 IsoStdLengthErrorViolation)的变体(如 [SWS_CORE_03107] 或 [SWS_CORE_03108])不同,此重载直接引用标准语义 [SWS_CORE_03106]。

关于并发性,可以推断(理解):对同一 BasicString 实例的修改性访问不是线程安全的,必须进行外部同步。 问题 Q-c2cefaa865bd3593 (未决)针对不同的替换场景,提供了相关的重载:通过位置说明使用子字符串替换([SWS_CORE_03107])、使用指向 C 字符串的指针([SWS_CORE_03108]、[SWS_CORE_03109])、使用 StringView([SWS_CORE_03312])或通过迭代器范围([SWS_CORE_03111])。

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

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

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

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

函数 replace [SWS_CORE_03107]

BasicString & replace (size_type pos1, size_type n1, const BasicString &str, size_type pos2, size_type n2=npos);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type 2. if ( pos > max_size() || pos2 > str.size() ) IsoStdOutOfRangeViolation is raised instead of std::out_of_range

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

使用

类 ara::core::BasicString(在 #include "ara/core/string.h" 中定义)的同步成员函数 replace 用字符串 str 中从索引 pos2 开始且最大长度为 n2 [SWS_CORE_03107] 的范围替换从位置 pos1 开始且长度为 n1 的子序列。参数 n2 默认采用 npos [SWS_CORE_03107]。该操作返回对已修改 BasicString 对象的引用作为返回值 [SWS_CORE_03107]。其行为遵循 C++ 标准规范 [basic.string],其中 charT 被替换为 value_type [SWS_CORE_03107]。

错误处理与异常安全性

在发生错误时,该函数偏离标准库:当 pos > max_size()(解释:大概率是指参数 pos1)或 pos2 > str.size() 成立时,将触发 IsoStdOutOfRangeViolation [SWS_CORE_03107]。 问题 Q-b4dc7d797ee025d8 (未决)该函数被明确指定为 not exception safe [SWS_CORE_03107]。

并发性与限制

由于该方法被声明为非异常安全,因此发生违规时对象可能会处于不一致状态 [SWS_CORE_03107]。因此,调用方必须确保传入的索引位于有效边界内。规范中未对线程安全性做出特别规定。

相互作用

该操作嵌入在 ara::core::BasicString 中 replace 的重载集合中。它与完整字符串 [SWS_CORE_03106]、C 字符串 [SWS_CORE_03108]、StringView [SWS_CORE_03312] 以及通用类型 [SWS_CORE_03313] 和迭代器范围 [SWS_CORE_03111] 的变体存在直接关联。

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

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception 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_03107
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03107@rel:R25-11#39c28396
Content hash
39c28396
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03107
Status: valid/unmigrated Version: rel:R25-11#fba2465f 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_03107@rel:R25-11#fba2465f
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

函数 replace [SWS_CORE_03108]

BasicString & replace (size_type pos, size_type n1, const value_type *s, size_type n2);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type 2. if ( pos1 > size() ) IsoStdOutOfRangeViolation is raised instead of std:: out_of_range 3. IsoStdLengthErrorViolation is raised instead of std::length_error (see condition in [11] )

Literaturverzeichnis SWS Core: [11] ISO/IEC 14882:2017, Programming languages – C++ – www.iso.org

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

使用

类 ara::core::BasicString 的成员函数 replace 通过头文件 ara/core/string.h 提供 [SWS_CORE_03108]。它同步将调用方字符串中从索引 pos 开始且最大长度为 n1 个元素的子序列替换为来自传入的 const value_type* 类型数组指针 s 的恰好 n2 个字符 [SWS_CORE_03108]。该行为遵循 ISO/IEC 14882:2017 的 [basic.string] 语义,其中 AUTOSAR 将通用字符类型 charT 替换为 value_type [SWS_CORE_03108]。该函数返回对已修改实例(BasicString&)的引用作为返回值 [SWS_CORE_03108]。

错误处理与违规

在调用参数错误或超出容量时,将触发 AUTOSAR 特定的违规 [SWS_CORE_03108]:

  • IsoStdOutOfRangeViolation:在起始索引 pos 位于当前字符串末尾之后时触发(在规范文本中声明为 pos1 > size();解释:pos1 指参数 pos)[SWS_CORE_03108]。 问题 Q-9aaa96ad13e137aa (未决)
  • IsoStdLengthErrorViolation:在生成的字符串长度超出限制值时代替 std::length_error 触发 [SWS_CORE_03108]。

并发性与限制

该函数被明确指定为非异常安全(“not exception safe”)[SWS_CORE_03108]。由于它直接修改对象,因此在未经外部同步的情况下,多个线程对同一实例的同时访问大概率会导致数据竞争。 问题 Q-38b0f634ce53f9da (未决)

相互作用

该方法属于 ara::core::BasicString 的相关 replace 重载族。它补充了带有完整字符串([SWS_CORE_03106]、[SWS_CORE_03107])、以空字符结尾的字符串([SWS_CORE_03109])或 StringView([SWS_CORE_03312])的调用,以及如 [SWS_CORE_03112] 中的基于迭代器的替换。

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

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception safe
Verletzungen (Violations)IsoStdLengthEr- Description as per std::length_error rorViolation 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_03108
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03108@rel:R25-11#80673f07
Content hash
80673f07
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03108
Status: valid/unmigrated Version: rel:R25-11#ccb57ce9 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_03108@rel:R25-11#ccb57ce9
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

函数 replace [SWS_CORE_03109]

BasicString & replace (size_type pos, size_type n1, const value_type *s);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

类 ara::core::BasicString ([SWS_CORE_03109]) 的同步成员函数 replace 从基于零的索引 pos 开始,最多将 n1 个字符替换为传入的以 null 结尾的字符序列 s。该接口通过头文件 #include "ara/core/string.h" 提供。根据规范,其行为遵循 C++ 标准定义 [basic.string],并带有将 charT 替换为 value_type 的已记录偏差 ([SWS_CORE_03109])。作为返回值,该函数提供对已修改 BasicString 对象的引用。

在异常和错误处理方面,该方法被明确指定为非异常安全(“not exception safe”)([SWS_CORE_03109])。解释:如果在执行过程中由于字符串扩容导致内存分配失败,对象可能会保持在无效状态。 问题 Q-93f202b2d0d414e3 (未决)虽然其他重载(如 [SWS_CORE_03107] 或 [SWS_CORE_03108])列出了特定的运行时违规(如 IsoStdOutOfRangeViolation 或 IsoStdLengthErrorViolation),但本规范条目未列出单独的违规。

由于 replace 会改变对象状态,因此针对同一实例的并发访问,该调用不是并发安全的。在与 BasicString 的接口配合时,该签名涵盖了以 null 结尾的指针,并对其他重载进行了补充:

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

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

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

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

函数 replace [SWS_CORE_03110]

BasicString & replace (size_type pos, size_type n1, size_type n2, value_type c);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

类 ara::core::BasicString([SWS_CORE_03110])的成员函数 replace 用于同步替换字符串内的子区域。它从基于字符的起始位置 pos 开始,将最多 n1 个现有字符替换为 n2 个连续的类型为 value_type 的字符 c 副本。该方法返回对调用方 BasicString 对象的引用作为结果,从而支持链接后续的字符串操作。其定义通过头文件 #include "ara/core/string.h" 提供([SWS_CORE_03110])。

关于错误与异常行为,该函数被指定为非异常安全(not exception safe)([SWS_CORE_03110])。其功能行为参考了 [basic.string] 中的 C++ 标准库定义,其中 charT 被替换为 value_type。与相关重载(如 [SWS_CORE_03107] 或 [SWS_CORE_03108])不同,该签名未指出如 IsoStdOutOfRangeViolation 这样的显式违规。解释:缺乏异常安全性可能表明,在发生内存分配错误或无效范围边界时,不会对对象状态保持强保证。 问题 Q-e32aa2a2af549632 (未决)

在与 ara::core::BasicString 的其他方法协作中,该签名构成了 [SWS_CORE_03414] 基于索引的对应部分,后者使用迭代器执行相同的替换过程。对于整串或视图的替换,可使用 [SWS_CORE_03106] 或 [SWS_CORE_03312] 等替代重载。

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

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

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

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

函数 replace [SWS_CORE_03111]

BasicString & replace (const_iterator i1, const_iterator i2, const BasicString &str);

As per corresponding usage in [basic.string]

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

使用

类 ara::core::BasicString 的成员函数 replace 将由两个迭代器 i1 和 i2 限定的子范围同步替换为传入字符串 str 的内容 [SWS_CORE_03111]。作为返回值,该函数返回对修改后对象(*this)的引用,从而可以直接链式调用方法 [SWS_CORE_03111]。使用时需要包含头文件 #include "ara/core/string.h" [SWS_CORE_03111]。

错误处理与限制

该函数被明确归类为 not exception safe [SWS_CORE_03111]。例如,如果用于容纳 str 所需的内部内存分配失败,则无法保证对象处于一致状态。与列出显式错误检查和违规(如 IsoStdOutOfRangeViolation 或 IsoStdLengthErrorViolation)的基于索引的重载(如 [SWS_CORE_03107] 或 [SWS_CORE_03108])不同,这种基于迭代器的变体未定义单独的 Violation [SWS_CORE_03111]。因此,调用者必须确保 [i1, i2) 表示对象内的有效范围(Interpretation:传递无效迭代器大概会导致未定义行为)。 问题 Q-8f94d47f7d10451b (未决)

相互作用

关于其语义,规范引用了 [basic.string] 下的标准 C++ 行为 [SWS_CORE_03111]。在 ara::core::BasicString 中,该签名补充了使用完整字符串进行基于索引的替换 [SWS_CORE_03106],以及替代的基于迭代器的重载,例如针对字符数组指针 [SWS_CORE_03112]、[SWS_CORE_03406]、StringView [SWS_CORE_03314] 或迭代器对 [SWS_CORE_03411]。

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

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

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

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

函数 replace [SWS_CORE_03112]

BasicString & replace (const_iterator i1, const_iterator i2, const value_type *s, size_type n);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

ara::core::BasicString 的成员函数 replace 将由迭代器 [i1, i2) 定义的子字符串替换为传入字符数组 s 的前 n 个字符 [SWS_CORE_03112]。该调用同步执行,并返回修改后的 BasicString 对象的引用 [SWS_CORE_03112]。声明由头文件 ara/core/string.h 提供。

其语义遵循 C++ 标准对 [basic.string] 的规定,其中类型 charT 被替换为 value_type [SWS_CORE_03112]。在容错能力和异常安全性方面,该操作明确归类为非异常安全(not exception safe)[SWS_CORE_03112]。与基于位置的重载(如 [SWS_CORE_03108])不同,未为此迭代器变体定义特定的 Violations(如 IsoStdOutOfRangeViolation)。

在 ara::core::BasicString 内部的相互作用中,该函数归入一组相关的重载中。虽然此签名从指针插入精确数量的字符,但相关接口允许通过基于完整指针的字符串 [SWS_CORE_03406]、StringView [SWS_CORE_03314] 或其他 BasicString 实例 [SWS_CORE_03111] 进行替换。

本文字由 AI 生成,并基于 AUTOSAR 版本 R25-11。

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

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

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

函数 replace [SWS_CORE_03312]

BasicString & replace (size_type pos1, size_type n1, StringView sv);

As per corresponding usage in [basic.string]

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

根据 [SWS_CORE_03312] 的成员函数 replace 在 ara::core::BasicString 的实例中,将从位置 pos1 开始且长度包含 n1 个字符的局部范围替换为传入的 StringView sv 的内容。它返回修改后的 BasicString 对象的引用,并以 [basic.string] 中的 C++ 标准用法为导向。

关于错误处理和异常行为,根据 [SWS_CORE_03312],该函数明确指定为 not exception safe。与相关重载(如 [SWS_CORE_03107]、[SWS_CORE_03108] 或 [SWS_CORE_03313])不同,此签名未定义特定的 AUTOSAR Violations(如 IsoStdOutOfRangeViolation),而是直接引用 [basic.string] 的标准行为。

使用时适用以下边界条件和接口关联:

  • 声明通过作用域 ara::core::BasicString 中的头文件 #include "ara/core/string.h" 进行 [SWS_CORE_03312]。
  • 作为可变字符串上的同步操作,该函数在同一实例上应当不是可重入的;并发调用推测需要外部同步。 问题 Q-7947ae98dff850d6 (未决)
  • 该方法补充了带有 StringView 的基于迭代器的重载 [SWS_CORE_03314] 以及针对字符串 [SWS_CORE_03106] 和来自通用类型的字符串视图 [SWS_CORE_03313] 的基于索引的重载。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03312
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03312@rel:R25-11#fe845edb
Content hash
fe845edb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03312
Status: valid/unmigrated Version: rel:R25-11#f3eb990e Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03312@rel:R25-11#f3eb990e
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#e288b4db2026-09-30
  • R19-11rel:R19-11#08e47d6a2026-10-14
  • R20-11rel:R20-11#c9c42b2c2026-10-14
  • R21-11rel:R21-11#a619bf562026-10-14
  • R22-11rel:R22-11#b2b225d02026-10-14
  • R23-11rel:R23-11#3d829aff2026-10-14
  • R24-11rel:R24-11#243984712026-10-14
  • R25-11rel:R25-11#f3eb990e2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 replace [SWS_CORE_03313]

template <class T> BasicString & replace (size_type pos1, size_type n1, const T &t, size_type pos2, size_type n2=npos);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type 2. if ( pos1 > size() || pos2 > sv.size() ) IsoStdOutOfRangeViolation is raised instead of std::out_of_range

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

类 ara::core::BasicString([SWS_CORE_03313],在 ara/core/string.h 中声明)的模板成员函数 replace 同步将字符串的子范围替换为对象 t 的片段。要替换的范围由起始位置 pos1 和字符数 n1 确定。要插入的范围由索引 pos2 以及最大长度 n2 确定,该长度默认设置为 npos([SWS_CORE_03313])。该函数返回对修改后实例的引用作为返回值。解释:类型 T 可能是与 StringView 兼容的类型,因为规范针对 sv.size() 检查了 pos2 的有效性。 问题 Q-a9d2f40a8aaa1fbe (未决)

该语义基于 ISO 标准 [basic.string],但定义了两个特定的偏差([SWS_CORE_03313]):

  • 字符类型 charT 被替换为 value_type。
  • 如果 pos1 > size() 或 pos2 > sv.size() 成立,则会触发违规 IsoStdOutOfRangeViolation,而不是 std::out_of_range。

在异常安全性方面,该函数被视为 not exception safe([SWS_CORE_03313])。在模块上下文中,该方法补充了相关的重载,例如直接传递带有子范围的 BasicString([SWS_CORE_03107])、使用 StringView 进行替换([SWS_CORE_03312]、[SWS_CORE_03314])以及基于指针的操作([SWS_CORE_03108])。

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

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception 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_03313
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03313@rel:R25-11#68b4f355
Content hash
68b4f355
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03313
Status: valid/unmigrated Version: rel:R25-11#82b8f92e Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03313@rel:R25-11#82b8f92e
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d16ae6fb2026-09-30
  • R19-11rel:R19-11#1968392a2026-10-14
  • R20-11rel:R20-11#678924542026-10-14
  • R21-11rel:R21-11#6c48bb252026-10-14
  • R22-11rel:R22-11#994b53b72026-10-14
  • R23-11rel:R23-11#572d552f2026-10-14
  • R24-11rel:R24-11#aca364122026-10-14
  • R25-11rel:R25-11#82b8f92e2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 replace [SWS_CORE_03314]

BasicString & replace (const_iterator i1, const_iterator i2, String View sv);

As per corresponding usage in [basic.string]

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

用法与语义

类 ara::core::BasicString([SWS_CORE_03314])的成员函数 replace 同步将由迭代器 i1 和 i2 限制的字符范围替换为传入的 StringView sv 的内容。该函数通过头文件 #include "ara/core/string.h" 提供,并返回对修改后实例(*this)的引用([SWS_CORE_03314])。在语义上,该操作遵循 C++ 标准 [basic.string] 的规定([SWS_CORE_03314])。

错误处理与边界条件

该操作在规范中被明确归类为“not exception safe”([SWS_CORE_03314])。虽然相关的基于索引的变体如 [SWS_CORE_03107] 或 [SWS_CORE_03313] 在越界时会显式触发 IsoStdOutOfRangeViolation,但此重载未定义单独的 Violation。Interpretation:传入的迭代器 i1 和 i2 大概必须表示目标实例内的有效范围,以避免未定义行为。 问题 Q-8dc533aaab166bea (未决)由于修改直接在对象上进行且不保证异常安全性([SWS_CORE_03314]),因此在没有外部同步的情况下的并发访问大概不是线程安全的。

模块内的相互作用

该签名归入 BasicString 的替换函数族。它代表使用 StringView([SWS_CORE_03312])进行基于索引替换的基于迭代器的对应项,并补充了用于字符串([SWS_CORE_03111])、字符数组([SWS_CORE_03112]、[SWS_CORE_03406])、迭代器范围([SWS_CORE_03411])以及初始化列表([SWS_CORE_03413])的其他基于迭代器的重载。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03314
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03314@rel:R25-11#75902014
Content hash
75902014
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03314
Status: valid/unmigrated Version: rel:R25-11#1790c7c6 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03314@rel:R25-11#1790c7c6
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d3e907b52026-09-30
  • R19-11rel:R19-11#9d1389532026-10-14
  • R20-11rel:R20-11#5d110e932026-10-14
  • R21-11rel:R21-11#f7fadcdd2026-10-14
  • R22-11rel:R22-11#8f86b8d02026-10-14
  • R23-11rel:R23-11#4353baae2026-10-14
  • R24-11rel:R24-11#9fc2c67f2026-10-14
  • R25-11rel:R25-11#1790c7c62026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 replace [SWS_CORE_03406]

BasicString & replace (const_iterator i1, const_iterator i2, const value_type *s);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

在头文件 #include "ara/core/string.h" 中声明的类 ara::core::BasicString([SWS_CORE_03406])的同步成员函数 replace 将由迭代器对 [i1, i2) 定义的字符串子范围替换为字符序列 s。作为返回值,该方法返回对调用实例的引用(BasicString&),从而允许链式调用其他字符串操作。其功能语义遵循 [basic.string] 中的规定,作为偏离,参数类型 charT 被替换为 value_type([SWS_CORE_03406])。

在执行安全性方面,该函数被明确指定为非异常安全(not exception safe)([SWS_CORE_03406])。与在范围错误时显式定义 IsoStdOutOfRangeViolation 或 IsoStdLengthErrorViolation 的带有索引和位置信息的重载(如 [SWS_CORE_03107] 或 [SWS_CORE_03108])不同,[SWS_CORE_03406] 未提及任何 AUTOSAR 特定的违规。因此,调用方可能负责确保 [i1, i2) 表示字符串内的有效迭代器范围,且指针 s 指向正确终止的字符序列。 问题 Q-17c75cd50135e0a8 (未决)

该函数与相关接口协作,丰富了 BasicString 的替换操作范围:

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03406
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03406@rel:R25-11#9236aa4b
Content hash
9236aa4b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03406
Status: valid/unmigrated Version: rel:R25-11#039a54cf 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_03406@rel:R25-11#039a54cf
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

函数 replace [SWS_CORE_03411]

template <class InputIterator> BasicString & replace (const_iterator i1, const_iterator i2, Input Iterator j1, InputIterator j2);

As per corresponding usage in [basic.string]

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

使用

来自头文件 ara/core/string.h 的类 ara::core::BasicString 的同步模板成员函数 replace 将由迭代器对 [i1, i2) 定义的字符串子范围替换为任意 InputIterator [SWS_CORE_03411] 的输入范围 [j1, j2) 的字符序列。其行为遵循 [basic.string] 的语义,并返回对修改后对象的引用(*this),从而支持链式方法调用 [SWS_CORE_03411]。

错误处理与异常安全性

该操作被明确规范为非异常安全(not exception safe)[SWS_CORE_03411]。与基于位置的重载(如 [SWS_CORE_03107]、[SWS_CORE_03108] 或 [SWS_CORE_03313],其中超出范围会导致违规 IsoStdOutOfRangeViolation 或 IsoStdLengthErrorViolation)不同,未针对此迭代器变体定义特定的违规 [SWS_CORE_03411]。

并发性与交互

由于模块标准未指定内部同步机制,在没有外部锁的情况下,多个线程对同一实例进行并发写入或读取访问可能不是线程安全的(解释)。 问题 Q-250c70f7907661f8 (未决)该函数属于基于迭代器的替换族,其中还包括针对 BasicString [SWS_CORE_03111]、StringView [SWS_CORE_03314]、字符数组 [SWS_CORE_03112]、[SWS_CORE_03406]、初始化列表 [SWS_CORE_03413] 和字符重复 [SWS_CORE_03414] 的变体。对于基于位置的替换,提供了诸如 [SWS_CORE_03106] 等替代方案。

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

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

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

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

函数 replace [SWS_CORE_03413]

BasicString & replace (const_iterator, const_iterator, std::initializer_list< value_type >);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

头文件 ara/core/string.h 中提供的类 ara::core::BasicString ([SWS_CORE_03413]) 成员函数 replace 同步将由两个 const_iterator 界定的字符范围替换为 std::initializer_list<value_type> 的元素。作为返回值,它提供对已修改 BasicString 对象的引用 ([SWS_CORE_03413])。其功能行为符合 C++ 标准规范 [basic.string],其中字符类型 charT 被替换为 value_type ([SWS_CORE_03413])。

在错误和异常处理方面,该函数被归类为 not exception safe ([SWS_CORE_03413])。与定义了特定运行时违规(如 IsoStdOutOfRangeViolation 或 IsoStdLengthErrorViolation)的基于索引的变体不同 ([SWS_CORE_03107], [SWS_CORE_03108], [SWS_CORE_03313]),该基于迭代器的重载未指明任何 AUTOSAR 违规。由于规范未规定同步机制,对同一字符串实例的并发修改访问可能不是线程安全的。 问题 Q-98d41e8b094a04a4 (未决)

该操作补充了针对整个字符串 ([SWS_CORE_03111])、带长度说明的指针 ([SWS_CORE_03112])、字符串指针 ([SWS_CORE_03406])、StringView ([SWS_CORE_03314])、迭代器范围 ([SWS_CORE_03411]) 和字符重复 ([SWS_CORE_03414]) 的基于迭代器的替换方法谱系。此外还存在基于索引和基于位置的重载 ([SWS_CORE_03106], [SWS_CORE_03109], [SWS_CORE_03110], [SWS_CORE_03312])。

本文由 AI 创建并整理。

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

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

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

函数 replace [SWS_CORE_03414]

BasicString & replace (const_iterator i1, const_iterator i2, size_type n, value_type c);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

通过头文件 #include "ara/core/string.h" 提供的类 ara::core::BasicString ([SWS_CORE_03414]) 成员函数 replace 将由迭代器对 i1 和 i2 界定的字符串子范围替换为 n 个类型为 value_type 的字符 c 的连续副本。其行为符合来自 [basic.string] 的标准化语义,其中根据 AUTOSAR 偏差将 charT 替换为 value_type ([SWS_CORE_03414])。作为返回值,同步调用返回对已修改 BasicString 对象的引用 ([SWS_CORE_03414])。

在错误处理方面,该函数被归类为 not exception safe ([SWS_CORE_03414])。与在范围或长度错误时触发特定运行时错误(如 IsoStdOutOfRangeViolation 或 IsoStdLengthErrorViolation)的基于索引的重载(如 [SWS_CORE_03107] 或 [SWS_CORE_03108])不同,[SWS_CORE_03414] 未指明任何违规。解释:调用方可能必须自行确保由 i1 和 i2 张成的迭代器范围的有效性,因为在缺少异常安全性的情况下,错误的范围可能导致未定义行为。 问题 Q-7cf889abe845c23e (未决)

在与该类的其他重载配合时,[SWS_CORE_03414] 构成了基于索引的函数 [SWS_CORE_03110](从索引 pos 开始将 n1 个字符替换为 n2 个字符 c)的基于迭代器的对应项。其他基于迭代器的替代方案允许通过 BasicString 对象 ([SWS_CORE_03111])、带长度说明的字符数组 ([SWS_CORE_03112])、以 null 结尾的字符串 ([SWS_CORE_03406])、StringView ([SWS_CORE_03314])、迭代器对 ([SWS_CORE_03411]) 或初始化列表 ([SWS_CORE_03413]) 进行替换。

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

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

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

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

函数 reserve [SWS_CORE_03054]

void reserve (size_type res_arg=0);

As per corresponding usage in [basic.string] except for the following deviations: 1. if (res_arg > max_size()) IsoStdLengthErrorViolation is raised instead of std:: length_error

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

类 ara::core::BasicString([SWS_CORE_03054])的同步成员函数 reserve 在模块 core 中用于字符串的容量预留。它通过头文件 <ara/core/string.h> 包含,并基本遵循 ISO-C++ 标准中关于 [basic.string] 的语义。通过签名 void reserve(size_type res_arg=0) 进行调用,其中参数 res_arg 默认预设为 0,且不返回值 [SWS_CORE_03054]。

关于错误处理,规范定义了与 C++ 标准行为的明确偏差:

  • 当请求的存储值超出最大大小时(res_arg > max_size()),将触发 IsoStdLengthErrorViolation 而非 std::length_error [SWS_CORE_03054]。
  • 该违规的内容描述与 std::length_error 的定义相对应 [SWS_CORE_03054]。

作为异常安全性方面的限制,该函数被明确归类为非异常安全(not exception safe)[SWS_CORE_03054]。此做法与来自 <ara/core/vector.h> 的容器类 ara::core::Vector 的方法 reserve 相对应([SWS_CORE_01347]),后者在容量请求无效时同样采用 IsoStdLengthErrorViolation。

本文本由 AI 生成;仅链接的规范具有约束力。

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception safe
Verletzungen (Violations)IsoStdLengthEr- Description as per std::length_error rorViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_03054
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03054@rel:R25-11#78b14454
Content hash
78b14454
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03054
Status: valid/unmigrated Version: rel:R25-11#160ce277 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_03054@rel:R25-11#160ce277
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

函数 resize [SWS_CORE_03058]

void resize (size_type sz);

As per corresponding usage in [basic.string] except for the following deviations: 1. if (sz > max_size()) IsoStdLengthErrorViolation is raised instead of std:: length_error

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

ara::core::BasicString([SWS_CORE_03058])的同步成员函数 resize 将字符串的长度调整为指定的元素数量 sz。它遵循 C++ 标准类型 [basic.string] 的语义,但在错误处理方面表现出 AUTOSAR 特定的特性。

错误处理与异常安全性

如果请求的大小 sz 超出最大值 max_size(),与 std::basic_string 不同,不会生成 std::length_error,而是引发 IsoStdLengthErrorViolation([SWS_CORE_03058])。该操作在规范中被明确声明为 not exception safe([SWS_CORE_03058])。如果内部内存请求或扩容失败,解释:对象的状态可能会保持为未定义或不一致,因此调用方应预先进行大小检查。 问题 Q-c6d85e83b588ae2e (未决)

相互作用与相关接口

  • 为了在扩容时进行针对性填充,ara::core::BasicString 提供了重载 resize(size_type, value_type)([SWS_CORE_03059])。
  • 容器类 ara::core::Vector 表现出类似的行为:其方法 [SWS_CORE_01350] 和 [SWS_CORE_01351] 在超出 max_size() 时同样会引发 IsoStdLengthErrorViolation,并且同样不具备异常保证。

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

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception safe
Verletzungen (Violations)IsoStdLengthEr- Description as per std::length_error rorViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_03058
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03058@rel:R25-11#6059fc69
Content hash
6059fc69
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03058
Status: valid/unmigrated Version: rel:R25-11#94ff135e 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_03058@rel:R25-11#94ff135e
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

函数 resize [SWS_CORE_03059]

void resize (size_type sz, value_type c);

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type 2. if (sz > max_size()) IsoStdLengthErrorViolation is raised instead of std:: length_error

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

类 ara::core::BasicString 的同步成员函数 resize(在头文件 ara/core/string.h、[SWS_CORE_03059] 中声明)将包含的字符数调整为目标大小 sz。如果字符串被增大,则额外字符用 value_type 类型的传入字符 c 填充。其语义遵循 C++ 标准中 [basic.string] 的定义,但不同之处在于 charT 被 value_type 替换([SWS_CORE_03059])。

关于错误处理和约束条件,以下规范适用:

  • 违规:如果 sz > max_size() 成立,则引发 IsoStdLengthErrorViolation。这取代了标准抛出 std::length_error 的做法([SWS_CORE_03059])。
  • 异常安全性:该操作被声明为 not exception safe([SWS_CORE_03059])。因此,诸如大小违规之类的错误状态可能会在平台端直接导致中止,而不是引发常规的 C++ 异常。 问题 Q-dbaa99841e0a0735 (未决)

该方法补充了 ara::core::BasicString 内的功能重载 resize(size_type sz)([SWS_CORE_03058])。对于超出最大长度时有关 IsoStdLengthErrorViolation 的相同策略,也被 ara::core::Vector 的容器方法所采用,即 resize(size_type sz)([SWS_CORE_01350])和 resize(size_type sz, const T &c)([SWS_CORE_01351])。

本文本由 AI 生成,仅供参考。始终以官方 AUTOSAR 规范为准。

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception safe
Verletzungen (Violations)IsoStdLengthEr- Description as per std::length_error rorViolation

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

Record
AUTOSAR/AP/record/SWS_CORE_03059
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03059@rel:R25-11#2d454e39
Content hash
2d454e39
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03059
Status: valid/unmigrated Version: rel:R25-11#38250de7 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_03059@rel:R25-11#38250de7
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

函数 rfind [SWS_CORE_03316]

size_type rfind (StringView sv, size_type pos=npos) const noexcept;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

使用

类 ara::core::BasicString 的成员函数 rfind([SWS_CORE_03316])在搜索位置 pos(默认值 npos)之前或该位置处,反向搜索字符串中最后一次出现的由 StringView sv 描述的子序列。它通过头文件 ara/core/string.h 引入,并将匹配项的索引作为 size_type 返回。其语义遵循 [basic.string],其中 charT 被替换为 value_type([SWS_CORE_03316])。

错误处理与异常安全性

该操作被声明为 noexcept 并归类为异常安全([SWS_CORE_03316])。规范中未定义特定的错误代码或错误消息(DET/DEM)。如果未找到搜索模式,则该函数根据底层的 [basic.string] 语义返回值 npos。

并发性与交互

作为 const 方法,rfind 不会改变实例的状态;因此,在没有外部同步的情况下,对同一字符串的并发读取访问应该是允许的。 问题 Q-f01ebf1745d77e74 (未决)在 ara::core::BasicString 内部,该函数代表了一种现代替代方案:虽然针对 const value_type* 和 value_type 的重载([SWS_CORE_03326]、[SWS_CORE_03327]、[SWS_CORE_03328])被标记为非异常安全,但 StringView 变体与针对 const BasicString& 的重载([SWS_CORE_03325])共享 noexcept 保证。对于只读字符序列视图,在 ara::core::StringView 中还存在相应的 rfind([SWS_CORE_02161])。

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03316
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03316@rel:R25-11#d07d8105
Content hash
d07d8105
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03316
Status: valid/unmigrated Version: rel:R25-11#a7dba94f Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03316@rel:R25-11#a7dba94f
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#860240592026-09-30
  • R19-11rel:R19-11#93cab4042026-10-14
  • R20-11rel:R20-11#661afb272026-10-14
  • R21-11rel:R21-11#97ac3d2f2026-10-14
  • R22-11rel:R22-11#83e75ac82026-10-14
  • R23-11rel:R23-11#2e0f154a2026-10-14
  • R24-11rel:R24-11#c7b1903a2026-10-14
  • R25-11rel:R25-11#a7dba94f2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 rfind [SWS_CORE_03325]

size_type rfind (const BasicString &str, size_type pos=npos) const noexcept;

As per corresponding usage in [basic.string]

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

使用

类 ara::core::BasicString([SWS_CORE_03325])的成员函数 rfind 向后搜索字符串以查找传入的子字符串 str 的最后一次出现。该函数在头文件 #include "ara/core/string.h" 中声明([SWS_CORE_03325])。参数 pos 确定反向搜索的起始位置,且默认设置为 npos。语义与 [basic.string] 中的用法相符([SWS_CORE_03325])。解释:未找到子字符串大概会根据 [basic.string] 通过返回 npos 来指示。 问题 Q-1470357608d753c1 (未决)

错误处理与异常安全性

该方法被声明为 noexcept,并被显式规范为异常安全(“exception safe”)([SWS_CORE_03325])。它在运行时不抛出异常,也不使用错误代码。

相互作用与重载

在类 ara::core::BasicString 内部存在用于搜索操作的相关重载:

本段文本由 AI 生成,基于 AUTOSAR 规范的要求。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03325
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03325@rel:R25-11#407d4295
Content hash
407d4295
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03325
Status: valid/unmigrated Version: rel:R25-11#8b5218d7 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_03325@rel:R25-11#8b5218d7
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

函数 rfind [SWS_CORE_03326]

size_type rfind (const value_type *s, size_type pos, size_type n) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

来自 [SWS_CORE_03326] 的成员函数 rfind 用于在 ara::core::BasicString 的实例(定义于 #include "ara/core/string.h" 中)内同步、反向搜索子字符串。它从起始位置 pos 开始反向搜索字符串中由指针 s 和长度规范 n 确定的序列。其行为符合 C++ 标准针对 [basic.string] 的规范,不同之处在于 charT 被替换为 value_type。

关于参数传递和调用上下文,实现可能假定 s 指向包含至少 n 个类型为 value_type 的有效元素的数组,因为基本规范未提供显式的指针检查。 问题 Q-f3b95ce1cdb3037a (未决)作为返回值,该函数提供类型为 size_type 的已找到位置,或者在失败的情况下根据标准行为返回值 npos。

在健壮性和并发性方面,[SWS_CORE_03326] 被指定为 not exception safe 且没有 noexcept 说明符。因此,它与 ara::core::StringView 中相应的指针重载([SWS_CORE_02163])有着本质区别,后者被声明为 constexpr 和 noexcept。此外,它也不同于针对 StringView([SWS_CORE_03316])和 BasicString 引用([SWS_CORE_03325])的 BasicString 变体,这些变体被标记为异常安全。它与重载 [SWS_CORE_03327] 和 [SWS_CORE_03328] 同样缺乏异常安全性。

本使用说明为自动生成,且完全基于 AUTOSAR 平台的规范要求。

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

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

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

函数 rfind [SWS_CORE_03327]

size_type rfind (const value_type *s, size_type pos=npos) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

类 ara::core::BasicString 的成员函数 rfind([SWS_CORE_03327],头文件 ara/core/string.h)从起始位置 pos(默认预设为 npos)开始反向搜索传入的以 null 结尾的类型为 const value_type* 的字符串 s 的最后一次出现。其行为遵循 [basic.string] 中的定义,其中 charT 被替换为 value_type [SWS_CORE_03327]。

对于使用和约束条件,以下各点适用:

  • 调用上下文和参数:该同步搜索函数需要一个指向要搜索的字符序列的指针 s 以及可选的索引 pos。它作为 size_type 返回找到的子字符串开头的索引位置,或者在未找到匹配项时返回 npos [SWS_CORE_03327]。
  • 异常安全性:与声明为 noexcept 的 StringView([SWS_CORE_03316])和 BasicString([SWS_CORE_03325])重载不同,该函数被归类为 not exception safe [SWS_CORE_03327]。这大概意味着在执行过程中不能排除异常。 问题 Q-175c749c7f0c276a (未决)
  • 交互与替代方案:对于具有额外长度限制的搜索,可以使用带参数 n 的重载([SWS_CORE_03326]),而单字符搜索则由 [SWS_CORE_03328] 覆盖。只要存在对 ara::core::StringView 的赋值,还存在相应的声明为异常安全的变体([SWS_CORE_02161]、[SWS_CORE_02164]),它们不同之处在于使用 pos = 0 作为默认值。

本使用说明自动创建。所有信息均完全基于 AUTOSAR Adaptive 的规范(Release R25-11)。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03327
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03327@rel:R25-11#6fd8525f
Content hash
6fd8525f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03327
Status: valid/unmigrated Version: rel:R25-11#5263c5b5 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_03327@rel:R25-11#5263c5b5
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

函数 rfind [SWS_CORE_03328]

size_type rfind (value_type c, size_type pos=npos) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. charT replaced with value_type

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

使用

来自头文件 ara/core/string.h 的类 ara::core::BasicString 的成员函数 rfind([SWS_CORE_03328])反向搜索字符串中类型为 value_type 的字符 c 的首次出现。搜索从位置 pos(默认预设为 npos)同步开始。其行为符合 [basic.string] 中的定义,其中 charT 被替换为 value_type([SWS_CORE_03328])。作为返回值,该函数将找到的字符的索引作为 size_type 返回。

错误处理与并发

与基于字符串且指定为 noexcept 和异常安全的重载 StringView([SWS_CORE_03316])或 BasicString([SWS_CORE_03325])不同,根据规范,此单字符搜索明确归类为非异常安全(not exception safe)([SWS_CORE_03328])。未针对此方法调用指定特定的 AUTOSAR 错误代码或向 DET 或 DEM 发送的消息。由于这是一个常量访问方法,因此只要实例未被同时修改,来自多个线程的纯读取并发调用应该是可能的。 问题 Q-b995c05a04d5e955 (未决)

相互作用

该方法补充了 BasicString::rfind 的指针重载([SWS_CORE_03326] 和 [SWS_CORE_03327]),它们同样被归类为非异常安全。如果非所有权字符串引用可用,ara::core::StringView 会提供类似的、但一致声明为 constexpr 和 noexcept 的针对单字符([SWS_CORE_02162])以及子字符串([SWS_CORE_02161]、[SWS_CORE_02163]、[SWS_CORE_02164])的搜索函数。

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

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

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

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

函数 shrink_ [SWS_CORE_03056]

void shrink_to_fit ();

As per corresponding usage in [basic.string]

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

使用

成员函数 shrink_to_fit()(在规范元素中声明为 shrink_)属于模块 core,并可在类 ara::core::BasicString 的作用域内通过头文件 #include "ara/core/string.h" 使用 [SWS_CORE_03056]。该方法具有无参签名 void shrink_to_fit (); 且不返回任何返回值 [SWS_CORE_03056]。根据需求,其语义遵循 [basic.string] 中的相应用法 [SWS_CORE_03056]。执行以同步方式进行,根据解释,其作用是使内存容量与字符串的实际长度相匹配。

错误处理与异常安全性

对于错误处理,规定该方法被归类为 not exception safe [SWS_CORE_03056]。此操作不存在特殊的错误代码或通过 DET 或 DEM 进行的通知。如果内部内存重新分配失败,推测该错误状态将直接且无异常保护地穿透到周围环境。 问题 (未决)

并发性与限制

由于函数 shrink_to_fit() 会修改内部数据结构,因此在 ara::core::BasicString 的同一实例上进行并发调用推测不是线程安全的 [SWS_CORE_03056]。 问题 (未决)因此,如有需要,调用方软件组件必须对同一字符串的并发访问进行外部保护。

本使用说明基于 AUTOSAR Adaptive Platform 规范版本 R25-11。

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

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

Record
AUTOSAR/AP/record/SWS_CORE_03056
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03056@rel:R25-11#eaea9e27
Content hash
eaea9e27
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03056
Status: valid/unmigrated Version: rel:R25-11#a000bb6c 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_03056@rel:R25-11#a000bb6c
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_03052]

size_type size () const noexcept;

As per corresponding usage in [basic.string]

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

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

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

函数 substr [SWS_CORE_03345]

BasicString substr (size_type pos=0, size_type n=npos) const;

As per corresponding usage in [basic.string] except for the following deviations: 1. if ( pos > size() ) IsoStdOutOfRangeViolation is raised instead of std:: out_of_range

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

使用

类 ara::core::BasicString 的方法 substr 根据 [SWS_CORE_03345] 同步生成一个类型为 BasicString 的新子字符串。该函数通过头文件 #include "ara/core/string.h" 提供。参数 pos 确定起始位置(默认值 0),而 n 指定要采用的最大字符数(默认值 npos)。其语义在很大程度上与 C++ 标准中 [basic.string] 的行为相对应。

错误处理与限制

在错误情况下,该实现特意偏离了标准:如果 pos > size() 成立,则会引发 IsoStdOutOfRangeViolation,而不是传统的 std::out_of_range [SWS_CORE_03345]。关于异常安全性,该方法被归类为 not exception safe,因此调用者在发生违例或为新 BasicString 对象进行内存分配时必须注意其状态。

相互作用

类 ara::core::StringView 的方法 substr 表现出类似的行为 [SWS_CORE_02141]。两个接口在发生越界(pos > size())时都会引发相同的 IsoStdOutOfRangeViolation。然而,与进行分配的 BasicString 变体不同,针对 StringView 的操作被指定为 constexpr、noexcept 且 exception safe。

本文本由 AI 基于规范数据生成。

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitnot exception 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_03345
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03345@rel:R25-11#b0d2ad42
Content hash
b0d2ad42
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03345
Status: valid/unmigrated Version: rel:R25-11#4208226d 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_03345@rel:R25-11#4208226d
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

函数 swap [SWS_CORE_03412]

void swap (BasicString &str) noexcept(std::allocator_traits< Allocator >::propagate_on_container_swap::value||std::allocator_traits< Allocator >::is_always_equal::value);

As per corresponding usage in [basic.string]

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Exception-Sicherheitconditionally exception safe

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

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

函数 ~BasicString [SWS_CORE_03038] Upstream: RS_AP_00145

~BasicString ();

As per corresponding usage in [basic.string]

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

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

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

类型别名文档

类型别名 allocator_type [SWS_CORE_03005]

using allocator_type = Allocator;

As per corresponding usage in [basic.string]

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Symbolallocator_type

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

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

类型别名 const_iterator [SWS_CORE_00072]

using const_iterator = {<const-iterator-type>};

As per corresponding usage in [basic.string] Implementation {<const-iterator-type>} shall be an implementation-defined type

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Symbolconst_iterator

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

Record
AUTOSAR/AP/record/SWS_CORE_00072
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00072@rel:R25-11#d2193338
Content hash
d2193338
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00072
Status: valid/unmigrated Version: rel:R25-11#c46946d2 Versionshistorie & Revisions (1 transition, 3 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_00072@rel:R25-11#c46946d2
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#802e45482026-09-30
  • R24-11rel:R24-11#9b7f5a322026-10-14
  • R25-11rel:R25-11#c46946d22026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

类型别名 const_pointer [SWS_CORE_03015]

using const_pointer = typename std::allocator_ traits<Allocator>::const_pointer;

As per corresponding usage in [basic.string]

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Symbolconst_pointer

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

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

类型别名 const_reference [SWS_CORE_03017]

using const_reference = const value_type&;

As per corresponding usage in [basic.string]

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Symbolconst_reference

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

Record
AUTOSAR/AP/record/SWS_CORE_03017
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03017@rel:R25-11#717f71ab
Content hash
717f71ab
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03017
Status: valid/unmigrated Version: rel:R25-11#85fa1342 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_03017@rel:R25-11#85fa1342
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

类型别名 const_reverse_iterator [SWS_CORE_03019]

using const_reverse_iterator = std::reverse_iterator<const_iterator>;

As per corresponding usage in [basic.string]

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Symbolconst_reverse_iterator

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

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

类型别名 difference_type [SWS_CORE_03013]

using difference_type = typename std::allocator_ traits<Allocator>::difference_type;

As per corresponding usage in [basic.string]

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Symboldifference_type

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

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

类型别名 iterator [SWS_CORE_00071]

using iterator = {<iterator-type>};

As per corresponding usage in [basic.string] Implementation {<iterator-type>} shall be an implementation-defined type

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Symboliterator

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

Record
AUTOSAR/AP/record/SWS_CORE_00071
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00071@rel:R25-11#d84aa4f5
Content hash
d84aa4f5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00071
Status: valid/unmigrated Version: rel:R25-11#4671c278 Versionshistorie & Revisions (1 transition, 3 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_00071@rel:R25-11#4671c278
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#cf2f21b82026-09-30
  • R24-11rel:R24-11#c41a0a9d2026-10-14
  • R25-11rel:R25-11#4671c2782026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

类型别名 pointer [SWS_CORE_03014]

using pointer = typename std::allocator_traits<Allocator>::pointer;

As per corresponding usage in [basic.string]

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Symbolpointer

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

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

类型别名 reference [SWS_CORE_03016]

using reference = value_type&;

As per corresponding usage in [basic.string]

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Symbolreference

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

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

类型别名 reverse_iterator [SWS_CORE_03018]

using reverse_iterator = std::reverse_iterator<iterator>;

As per corresponding usage in [basic.string]

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Symbolreverse_iterator

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

Record
AUTOSAR/AP/record/SWS_CORE_03018
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03018@rel:R25-11#f96c3fa8
Content hash
f96c3fa8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03018
Status: valid/unmigrated Version: rel:R25-11#99bb046f 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_03018@rel:R25-11#99bb046f
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_type [SWS_CORE_03012]

using size_type = typename std::allocator_traits<Allocator>::size_ type;

As per corresponding member in [basic.string] except for the following deviations: 1. Type shall be specialized to std::size_t

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Symbolsize_type

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

Record
AUTOSAR/AP/record/SWS_CORE_03012
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_03012@rel:R25-11#478a3cf9
Content hash
478a3cf9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_03012
Status: valid/unmigrated Version: rel:R25-11#f0940e92 Versionshistorie & Revisions (1 transition, 5 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_03012@rel:R25-11#f0940e92
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#c77b17e62026-09-30
  • R22-11rel:R22-11#5bdb8d782026-10-14
  • R23-11rel:R23-11#7246a5772026-10-14
  • R24-11rel:R24-11#9c1265462026-10-14
  • R25-11rel:R25-11#f0940e922026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

类型别名 traits_type [SWS_CORE_03003]

using traits_type = typename std::char_traits<char>;

As per corresponding usage in [basic.string] except for the following deviations: 1. Type shall be specialized to std::char_traits<char>

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Symboltraits_type

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

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

类型别名 value_type [SWS_CORE_03004]

using value_type = typename std::allocator_traits<Allocator>::value_ type;

As per corresponding usage in [basic.string] except for the following deviations: 1. Type shall be specialized to std::allocator_traits<Allocator>::value_type

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Symbolvalue_type

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

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

常量 / 变量文档

变量 npos [SWS_CORE_00073]

static constexpr size_type const npos = size_type(-1);

As per corresponding usage in [basic.string]

Header-Datei#include "ara/core/string.h"
Scopeclass ara::core::BasicString
Symbolnpos
Typsize_type const

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

Record
AUTOSAR/AP/record/SWS_CORE_00073
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00073@rel:R25-11#4c9ecee9
Content hash
4c9ecee9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00073
Status: valid/unmigrated Version: rel:R25-11#48d3de6a Versionshistorie & Revisions (1 transition, 3 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_00073@rel:R25-11#48d3de6a
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#df4710782026-09-30
  • R24-11rel:R24-11#35a79a292026-10-14
  • R25-11rel:R25-11#48d3de6a2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill