Conversion库由四个转换函数组成,分别提供了更好的类型安全性(polymorphic_cast),更高效的类型安全防护(polymorphic_downcast),范围检查的数字转换(numeric_cast), 以及文字转换(lexical_cast).
由于dynamic_cast对指针和引用类型的不同行为(对指针转型失败不抛出异常).
The value of a failed cast to pointer type is the null pointer. A failed cast to reference type throws a bad_cast exception.(复习dynamic_cast先)
BOOST库之Conversion[1]
最新推荐文章于 2021-11-13 15:16:11 发布