![]() |
2
8
它被称为 Curiously Recurring Template 模式,并允许静态多态性。 当您希望向特定类添加功能,但希望该实用程序在一般情况下可用时,它很有用。通过使实用程序依赖并使用模板参数,可以同时实现这两个目的。 |
![]() |
3
5
Curiously Recurring Template Pattern ,或我们的CRTP call it |