BOOST库之Conversion[1]

来源:互联网 发布:90度折弯时下料的算法 编辑:程序博客网 时间:2024/04/30 23:42

     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先)

原创粉丝点击