https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95160

            Bug ID: 95160
           Summary: Explicit specialization in non-namespace scope bug
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mikelojkovic at gmail dot com
  Target Milestone: ---

#define DECLARE_INTERNAL_LINK_BASE(T) template<int Counter> struct T
#define DECLARE_INTERNAL_LINK_SPECIALIZATION(T, Counter) template<> struct
T<Counter>

namespace TestBugFix
{
        struct FPlatformTypeLayoutParameters
        {
                DECLARE_INTERNAL_LINK_BASE(InternalLinkType);
                DECLARE_INTERNAL_LINK_SPECIALIZATION(InternalLinkType,
__COUNTER__);
        };
}

Causes explicit specialization in non-namespace scope error for C++ 17 and up.
I was told this should compile for those.Is this a bug?

Reply via email to