From Jason Turner
Watch on YouTube

Summary

This episode explores C++23's new feature allowing attributes to be applied to lambda expressions. Jason demonstrates how attributes like [[nodiscard]] and [[noinline]] can be placed before a lambda's parameter list to affect the function itself, similar to regular function attributes. He also explains a less obvious feature where attributes can be placed after the parameter list to apply to the lambda's function type rather than its return type, though practical applications of this placement remain unclear even after community discussion.

Resources

Tags