To answer my own question, based on the comments above: the preprocessed syntax is indeed invalid according to the official standards. Hence the use of a GNU-extension preprocessor tag that requires -std=gnu++XY.
In my Mac build I added -std=c++20 myself, thinking it wouldn't hurt but in fact shooting myself in the foot.