From Jason Turner
Watch on YouTube

Summary

This episode builds on previous variadic template discussions, focusing on guaranteed execution order in parameter pack expansions. Jason demonstrates that while function parameter evaluation order is generally unspecified in C++, there are two specific contexts where order is guaranteed: initializer lists and comma-separated expressions. He shows how to leverage these guarantees when working with variadic templates to ensure operations are executed in the intended sequence, which is particularly important for side-effect operations in parameter pack expansions.

Resources

Tags