Unsatisfyingly, the flag -std=c++20 just wasn't using a compliant c++20 implementation; I tried -std=c++23 and it works. Thanks to @NateEldredge for starting me off on the right track, though.
-std=c++20
-std=c++23