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.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[util.smartptr.shared.const]63% match -
[refwrap.const]63% match -
[new.delete.general]62% match -
[unique.ptr.dltr.dflt1]56% match -
[unique.ptr.dltr.dflt]55% match -
[util.smartptr.shared.cast]53% match -
[diff.cpp20.utilities]50% match -
[saferecl.hp.base]49% match