From Jason Turner
Watch on YouTube

Summary

Jason Turner explores C++20's new conditionally explicit specifier, which allows constructors and conversion operators to be explicitly marked based on a compile-time condition. He demonstrates how this feature can improve type safety by making potentially expensive conversions explicit while allowing implicit conversions for trivial, inexpensive types. The episode shows practical examples with a templated wrapper class, illustrating how to create type-dependent conversion behaviors without duplicating code.

Resources

Tags