Library 2. Conversion
How Does the Conversion Library Improve Your Programs?
• Understandable, maintainable, and consistent polymorphic conversions
• Static downcasting using safer constructs than static_cast
• Range-preserving numeric conversions that ensure correct value logic and less time debugging
• Correct and reusable lexical conversions that lead to less time coding
The versatility of C++ is one of the primary reasons for its success, but sometimes also a formidable source of headaches because of the complexity of certain parts of the language. For instance, the rules for numeric conversions and type promotions are far from trivial. Other conversions are trivial, but tedious; how many times do we need to write a safe function1 for converting ...
Get Beyond the C++ Standard Library: An Introduction to Boost now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.