Strong type
在阅读 fluentcpp Strongly typed constructors 时,发现的这个主题。
Fluentcpp strong type
https://www.fluentcpp.com/2016/12/08/strong-types-for-strong-interfaces/
https://www.fluentcpp.com/2017/08/08/metaclasses-ultimate-answer-strong-typing-c/
arne-mertz.de Use Stronger Types!
Implementation
Mixin from above
1、Variadic inheritance
2、CRTP mixin from above
Example:
参见 C++\Expert\Fluentcpp\joboccara-NamedType
章节。
Mixin from below
1、parameter base class
2、CRTP
Example: