From Jason Turner
Watch on YouTube

Summary

This episode explores why C++20 has deprecated the use of the comma operator in array subscripts. Jason demonstrates how the comma operator can be abused to create confusing code when used in array indexing, where expressions like array[2,3] don't access a multidimensional array but instead evaluate both operands and return only the last value (3). This deprecation prepares the language for potentially supporting proper multidimensional array syntax in future C++ versions.

Resources

Tags