C++ 객체 수명과 암묵적 객체 생성

C++ 객체 수명과 암묵적 객체 생성
C++ 객체 수명과 암묵적 객체 생성 규칙을 정리하며 reinterpret_cast 사용 시의 UB 가능성을 설명했습니다. C++20의 표준 수용 범위와 std::launder, placement new의 역할도 함께 다루었습니다.
#C++#reinterpret_cast
59005분

C++ 객체 수명과 암묵적 객체 생성 규칙을 정리하며 reinterpret_cast 사용 시의 UB 가능성을 설명했습니다. C++20의 표준 수용 범위와 std::launder, placement new의 역할도 함께 다루었습니다.

C++에서 타입 퍼닝과 포인터 변환에 `std::bit_cast`와 `reinterpret_cast`를 어떻게 구분해 써야 하는지 정리했습니다. 엄격한 앨리어싱 규칙과 포인터↔정수 변환의 의미론도 함께 설명했습니다.