https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114933
--- Comment #6 from LIU Hao <lh_mouse at 126 dot com> --- ISO/IEC WG21 N4917 > 13.9.4 Explicit specialization [temp.expl.spec] > 2 An explicit specialization shall not use a storage-class-specifier (9.2.2) > other than thread_local. This paragraph is new in N4658 and was not in N4917. Better to avoid it by moving the specialization into an extern "C++" block. Thanks for the report.