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] PR 60999


Hi,

On 05/03/2014 11:14 PM, Jason Merrill wrote:
On 04/30/2014 05:15 AM, Paolo Carlini wrote:
      decl = (CLASSTYPE_TEMPLATE_INFO (DECL_CONTEXT (decl))
+        && uses_template_parms (DECL_CONTEXT (decl))

Do you want CLASSTYPE_IS_TEMPLATE here?
Uhm, you mean something simple like the attached? Because certainly I tried it and didn't fully work (nsdmi-template7.C?) and for sure we would regress on the below (which we should probably also add to testsuite, I had it two days ago in my experiments...).

Thanks,
Paolo.

//////////////////////

Attachment: p
Description: Text document

// PR c++/60999
// { dg-do compile { target c++11 } }

struct B
{
  template<int N, int M>
  struct A;

  template<int M>
  struct A<1, M>
  {
    int X = M;
  };
};

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