DEENESPTFRRUARHIKOZHNL

구조체 ara::core::in_place_index_t

[SWS_CORE_04031] Upstream: RS_AP_00130

template <std::size_t Index> struct in_place_index_t {...};

Denote an index-distinguishing operation to be performed in-place. An instance of this type can be passed to certain constructors of ara::core::Variant to denote the intention that construction of the contained type shall be done in-place, i.e. without any copying taking place.

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

사용자 가이드AI 생성

인덱스를 기반으로 Variant 내에 값을 직접 인플레이스(in-place) 생성하기 위한 태그 타입 역할을 합니다.
AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 39c809af4202 출처 열린 질문 (2)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

인덱스를 기반으로 Variant 내에 값을 직접 인플레이스(in-place) 생성하기 위한 태그 타입 역할을 합니다.

클래스 템플릿 ara::core::in_place_index_t은(는) 대상 값의 불필요한 복사 또는 이동 작업을 방지하기 위해 ara::core::Variant 내의 특정 인덱스에서 수행되는 인플레이스(in-place) 생성을 식별하기 위한 태그 타입 역할을 합니다. 인스턴스는 적절한 Variant 생성자에 명시적으로 전달되며, 생성은 ara/core/utility.h의 기본 생성자를 통해 수행됩니다 [SWS_CORE_04032]. 생성자가 explicit 및 noexcept(으)로 정의되어 있으므로 암시적 타입 변환이 배제되며 인스턴스화의 예외 안전성이 보장됩니다 [SWS_CORE_04032].

컨텍스트

클래스 템플릿 ara::core::in_place_index_t은(는) AUTOSAR Adaptive Platform의 core 모듈에 속한 헬퍼 구조체이며, 헤더 파일 ara/core/utility.h을(를) 통해 제공됩니다 [SWS_CORE_04032]. 이 템플릿의 기능적 역할은 숫자 인덱스를 통해 구분되는 인플레이스 작업을 위한 고유한 태그 타입 역할을 하는 것입니다. 이 타입의 인스턴스는 복사나 이동 작업을 수행하지 않고 포함된 타입을 현장(“in-place”)에서 직접 생성하려는 의도를 나타내기 위해 ara::core::Variant의 특정 생성자에 전달됩니다.

호출자와 합 타입(sum type) ara::core::Variant 간의 협력에서 ara::core::in_place_index_t은(는) 태그 디스패칭 기능을 담당합니다. Interpretation: 인덱스 기반 구분은 동일한 타입의 대안을 여러 개 포함하는 Variant 인스턴스에 특히 유효할 것으로 보입니다. 이 경우 데이터 타입만으로는 선택이 모호해지므로, 템플릿 매개변수 Index을(를) 통한 어드레싱이 타입 팩 내의 정확한 타입 대안을 결정합니다. 질문 Q-fc429a7c9e7e9362 (열림)

수명 주기

ara::core::in_place_index_t의 라이프사이클은 기초적이며 복잡한 상태 전이가 없습니다. 생성은 기본 생성자 explicit in_place_index_t() noexcept = default;을(를) 통해 이루어집니다 [SWS_CORE_04032]. explicit(으)로 지정됨으로써 암시적 타입 변환이 차단되므로, 명시적이고 엄격한 타입의 인스턴스화가 강제됩니다 [SWS_CORE_04032].

ara::core::in_place_index_t은(는) 순수한 지시자 역할을 하며 내부 속성이나 동적 리소스를 보유하지 않으므로, 객체는 완전히 무상태(stateless)입니다. 소멸은 사소하며(trivial) 어떠한 부작용도 초래하지 않습니다. 동시성 측면에서 이 구조체는 본질적으로 스레드 안전합니다. 변경 가능한 상태가 존재하지 않으므로 인스턴스는 동기화 오버헤드 없이 스레드 경계를 넘어 사용될 수 있습니다.

사용 경로

ara::core::in_place_index_t 사용을 위한 일반적인 절차는 다음 단계로 구성됩니다:

  • 인덱스 지정: 호출자는 ara::core::Variant 내에서 원하는 대안을 나타내는 숫자 템플릿 매개변수 Index을(를) 결정합니다.
  • 태그 인스턴스화: ara::core::in_place_index_t<Index>의 인스턴스는 기본 생성자를 통해 생성됩니다 [SWS_CORE_04032]. Interpretation: 실제로는 호출 시 직접 임시 인수로 생성되는 것이 일반적일 것으로 보입니다. 질문 Q-7c6292c2e97347b0 (열림)
  • 생성자 전달: 태그 인스턴스는 ara::core::Variant의 생성자에 첫 번째 인수로 전달되며, 그 뒤를 이어 해당 위치에서 관리되는 대상 타입을 위한 생성자 인수들이 전달됩니다.
  • 직접 초기화: ara::core::Variant은(는) 임시 사본을 미리 생성하지 않고 제공된 메모리 영역에 대상 객체를 직접 생성합니다.
in_place_index_t를 통한 Variant 값의 제자리(in-place) 생성Anwenderin_place_index_t<Index>VariantZielobjektexplicit in_place_index_t()Tag-InstanzVariant(in_place_index_t<Index>, args...)인덱스 확인In-Place-Konstruktion(args...)Objekt instanziiertInitialisierte Variant-Instanz

시퀀스 다이어그램: ara::core::in_place_index_t를 통한 Variant 값의 일반적인 인플레이스 생성 흐름. 출처: [SWS_CORE_04032]

오류 시나리오

오류 허용성과 관련하여 ara::core::in_place_index_t은(는) 극대화된 견고성을 특징으로 합니다. 기본 생성자는 noexcept(으)로 지정되어 있으며 예외 안전(“exception safe”)한 것으로 간주됩니다 [SWS_CORE_04032]. 이 구조체에 대한 오류 코드나 정의된 오류 상태는 존재하지 않습니다.

암시적 변환 시의 잘못된 사용은 explicit 지정을 통해 컴파일 타임에 거부됩니다 [SWS_CORE_04032]. ara::core::Variant의 인플레이스 생성자 실행 중에 예외가 발생하는 경우, 이는 ara::core::in_place_index_t에서 기인한 것이 아니라 생성되는 대상 타입의 오류 동작에 원인이 있습니다.

이 가이드는 AUTOSAR 사양 R25-11을 기반으로 AI에 의해 생성되었습니다.

UML 클래스 다이어그램

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

G nara__core__in_place_index_t938 «struct» in_place_index_t + in_place_index_t()

생성자 및 소멸자

Default constructor

explicit in_place_index_t () noexcept=default;

메서드 문서

함수 in_place_index_t [SWS_CORE_04032] Upstream: RS_AP_00130

explicit in_place_index_t () noexcept=default;

Default constructor

Header-Datei#include "ara/core/utility.h"
Scopestruct ara::core::in_place_index_t
Exception-Sicherheitexception safe

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

Record
AUTOSAR/AP/record/SWS_CORE_04032
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_04032@rel:R25-11#3fcc9c08
Content hash
3fcc9c08
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_04032
Status: valid/unmigrated Version: rel:R25-11#ed0aabbb 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_04032@rel:R25-11#ed0aabbb
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#8aa0e9952026-09-30
  • R19-11rel:R19-11#1dfe84832026-10-14
  • R20-11rel:R20-11#98f310882026-10-14
  • R21-11rel:R21-11#98f310882026-10-14
  • R22-11rel:R22-11#b23504bd2026-10-14
  • R23-11rel:R23-11#b523cc942026-10-14
  • R24-11rel:R24-11#a52ebef82026-10-14
  • R25-11rel:R25-11#ed0aabbb2026-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