Overview
Coursera Spring Sale
40% Off Coursera Plus Annual!
Grab it
Explore the intricacies of type casting in C++ through this comprehensive conference talk that demystifies one of programming's most misunderstood concepts. Learn about the various casting mechanisms available in C++, including the traditional C-style cast and modern C++ casting operators, understanding their specific purposes, syntax, and appropriate use cases. Discover how casts function as a communication tool between programmer and compiler when type systems don't align with program requirements. Delve into practical techniques for implementing custom casts to enhance code clarity and express programmer intent more effectively. Examine the philosophical and technical reasons why developers sometimes need to override compiler type checking, exploring scenarios where casting becomes necessary for efficient and maintainable code. Gain insights into best practices for using casts responsibly while understanding their potential pitfalls and how to avoid common mistakes that can lead to undefined behavior or security vulnerabilities.
Syllabus
Casts in C++: To lie... and hopefully - to lie usefully - Patrice Roy - Meeting C++ 2025
Taught by
Meeting Cpp