From Jason Turner
Watch on YouTube

Summary

This episode explains decltype(auto), a powerful C++11 feature that deduces the exact type of an expression, including reference and const qualifiers. Jason demonstrates how decltype(auto) differs from regular auto, particularly in the context of function return types where it can perfectly preserve the type returned by a wrapped function. The feature is especially valuable in generic code when precise type deduction is needed.

Resources

Tags