Tho*_*son 6 c++ templates terminology crtp static-polymorphism
这种模式的目的是什么?这叫什么?当我第一次看到它时,它看起来很奇怪,尽管我现在已经看过很多次了.
template<typename Derived>
struct Base {
//...
};
struct Example : Base<Example> {
//...
};
Run Code Online (Sandbox Code Playgroud)