타입 이레이저의 기초를 배우며 std::any의 내부 작동 방식을 탐구합니다.
이 글은 std::any의 내부 작동 방식인 타입 이레이저에 대한 설명을 제공합니다. 가상 함수와 템플릿과 같은 익숙한 도구들을 사용하여 최소한의 std::any를 구축하는 과정을 안내합니다. 이를 통해 독자는 타입 이레이저가 어떻게 작동하는지 명확히 이해할 수 있습니다.
Explore how type erasure works internally using std::any in this article.
This article delves into the internal workings of type erasure as seen in std::any. It guides the reader through building a minimal version of std::any using familiar tools like virtual functions and templates. By the end, readers will have a clear understanding of how type erasure operates.