From Jason Turner
Watch on YouTube

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.

Resources

Tags