I tried this with gcc-10.1 using -std=gnu++17 and -std=gnu++2a options. This code snippet will not compile, if line A is uncommented:
-std=gnu++17
-std=gnu++2a