This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ Patch/RFC] PR 71569 ("[6/7/8 regression] Crash: External definition of template member from template struct")


On Wed, Feb 28, 2018 at 9:36 AM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> in this P2 ICE on invalid we fail to diagnose an ill-formed variable
> template partial specialization and the assert at the beginning of
> determine_specialization triggers. Indeed, we didn't diagnose the problem
> via check_specialization_scope (there are no template <>, thus
> begin_specialization isn't involved). Simply adding a specific check to
> check_explicit_specialization exactly when we recognize a variable template
> partial specialization seems a safe thing to do and passes testing. Not sure
> if the test itself is as simple as possible or is better done somewhere
> else...

Hmm, this doesn't look like the user intended to write a partial
specialization, but rather that they were trying to define the member
template and wrote the template arguments out by mistake.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]