C++23의 명시적 객체 매개변수를 활용한 CRTP 변형인 Exotic CRTP를 소개합니다.
이 글에서는 CRTP의 변형인 Exotic CRTP에 대해 다루고 있습니다. 이 방법은 친구 선언 없이 엄격한 인터페이스와 구현 경계를 강제화하여 파생 클래스 메서드를 캡슐화할 때 발생하는 보일러플레이트를 최소화합니다. C++23의 명시적 객체 매개변수와 작은 접근 래퍼 타입을 사용하여 인터페이스 계층을 통해서만 구현이 호출되도록 합니다.
Introducing Exotic CRTP, a variant of CRTP using C++23 explicit object parameters.
This article discusses Exotic CRTP, a variant of CRTP that enforces a strict interface/implementation boundary without friend declarations. The method aims to minimize boilerplate encountered when encapsulating derived class methods by utilizing C++23 explicit object parameters along with a small access wrapper type. This design ensures that implementations can only be invoked through the interface layer.