Summary
This episode examines a lesser-known C++ feature: the ability to return a void expression from a void function. Jason explores how this capability, combined with C++14's auto return type deduction, enables more generic and flexible function wrappers. The episode demonstrates how a single generic wrapper function can properly handle both void and value-returning functions, and further shows how decltype(auto) can perfectly preserve the exact return type including references.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[expected.bad.void]59% match