https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113300
--- Comment #4 from Jason Liam <jlame646 at gmail dot com> --- (In reply to Andrew Pinski from comment #1) > There is a C++ defect report in this area even ... Looks like that gcc and clang are non-compliant here as per this discussion in CWG issue list: https://github.com/cplusplus/CWG/issues/486 Also, the cwg 1228 is categorised as NAD. https://wg21.link/cwg1228 so this(that the program should compile) looks intentional.