std::any 与类型擦除边界 | C++

本章覆盖:`std::any`;runtime type erasure;`any_cast`;heterogeneous value;plugin / property bag 场景;type safety 在读取点恢复;runtime overhead;不应用 any 逃避建模;variant 在封闭类型集合下通常更清晰。

本章知识点

  • std::any
  • runtime type erasure
  • any_cast
  • heterogeneous value
  • plugin / property bag 场景
  • type safety 在读取点恢复
  • runtime overhead
  • 不应用 any 逃避建模
  • variant 在封闭类型集合下通常更清晰