From Jason Turner
Watch on YouTube

Summary

Jason Turner explores C++20's designated initializers, clarifying the correct syntax (.member = value) and demonstrating that they enforce type safety similar to braced initialization. He also shows that immediately invoked lambdas can be used with designated initializers, providing a powerful way to perform complex initializations without worrying about move or copy operations. Jason tests the limits of designated initializers by attempting to use them with class template type deduction, finding that this combination doesn't work well with constructors in the current implementation.

Resources

Tags