1 post tagged #structured-bindings.
#structured-bindings
C++26 lets a structured binding declaration be the condition of an if. GCC 16.1 and Clang 22.1 both implement it and both agree on ordinary structs. Put a tuple-protocol type in the condition and evaluate it at compile time, and GCC rejects the program while Clang accepts it. The reproducer is twenty lines and needs no library.
// We use Google Analytics to understand which posts get traction and how the wro.cpp community grows. Anonymised, no ads, and you can decline -- the site works either way.