From Jason Turner
Watch on YouTube

Summary

Building on his previous episode about disabling moves from const objects, Jason explores the power of the =delete specifier in C++11. He demonstrates how to selectively delete specific overloads from function templates, enabling fine-grained control over which parameter types are accepted. This technique can prevent unintended implicit conversions by explicitly making certain parameter types invalid, forcing compile-time errors instead of silently accepting potentially problematic conversions.

Resources

Tags