https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109763
--- Comment #10 from Jason Liam <jlame646 at gmail dot com> --- Upon reading more on this, seems this is well-formed. Note [temp.constr.normal#1.4] is about parameter mapping(which is valid in this case) so the last sentence in my previous quoted reference does not apply. Instead [temp.constr.atomic#3] will apply so that the constraint is not satisfied and hence result should be 0(which is what all compilers generate). Thus all compilers are correct in accepting the code.