/cp
2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60999
* pt.c (maybe_begin_member_template_processing): Use
uses_template_parms.
/testsuite
2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60999
* g++.dg/cpp0x/nsdmi-template9.C: New.
* g++.dg/cpp0x/nsdmi-template10.C: Likewise.
From-SVN: r210126
+2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/60999
+ * pt.c (maybe_begin_member_template_processing): Use
+ uses_template_parms.
+
2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
Mike Stump <mikestump@comcast.net>
Richard Sandiford <rdsandiford@googlemail.com>
bool nsdmi = TREE_CODE (decl) == FIELD_DECL;
if (nsdmi)
- decl = (CLASSTYPE_TEMPLATE_INFO (DECL_CONTEXT (decl))
- ? CLASSTYPE_TI_TEMPLATE (DECL_CONTEXT (decl))
- : NULL_TREE);
+ {
+ tree ctx = DECL_CONTEXT (decl);
+ decl = (CLASSTYPE_TEMPLATE_INFO (ctx)
+ /* Disregard full specializations (c++/60999). */
+ && uses_template_parms (ctx)
+ ? CLASSTYPE_TI_TEMPLATE (ctx) : NULL_TREE);
+ }
if (inline_needs_template_parms (decl, nsdmi))
{
--- /dev/null
+// 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;
+ };
+};
--- /dev/null
+// PR c++/60999
+// { dg-do compile { target c++11 } }
+
+template <typename A>
+struct foo
+{
+};
+
+template<>
+struct foo<int>
+{
+ static constexpr int code = 42;
+ unsigned int bar = static_cast<unsigned int>(code);
+};
+
+foo<int> a;