https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120190
Bug ID: 120190 Summary: Definition of the primary template of std::format_kind seems IFNDR Product: gcc Version: 16.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: de34 at live dot cn Target Milestone: --- Currently, libstd++ defines the primary template of std::format_kind as: ``` template<typename _Rg> constexpr auto format_kind = __primary_template_not_defined( format_kind<_Rg> // you can specialize this for non-const input ranges ); ``` It seems that such definition is always invalid, and causes the program ill-formed, no diagnostic required per [temp.res.general]/6 (https://eel.is/c++draft/temp.res.general#6). Recently, Clang starts to reject such definition before instantiation (https://godbolt.org/z/aYhd851hE). IIUC we should use either static_assert or some merging trick to be pedantically correct.