PR c++/66743
* pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
TYPE_VALUES_RAW rather than TYPE_FIELDS.
From-SVN: r225365
+2015-07-02 Jason Merrill <jason@redhat.com>
+
+ PR c++/66743
+ * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
+ TYPE_VALUES_RAW rather than TYPE_FIELDS.
+
2015-07-02 Andrew Sutton <andrew.n.sutton@gmail.com>
* pt.c (type_dependent_expression_p): Handle expressions
case TYPEOF_TYPE:
case UNDERLYING_TYPE:
if (pfd->include_nondeduced_p
- && for_each_template_parm (TYPE_FIELDS (t), fn, data,
+ && for_each_template_parm (TYPE_VALUES_RAW (t), fn, data,
pfd->visited,
pfd->include_nondeduced_p))
return error_mark_node;
--- /dev/null
+// PR c++/66743
+// { dg-do compile { target c++11 } }
+
+template< class T >
+struct
+ type_is { using type = T; };
+
+template< class T >
+ using underlying_type = type_is<__underlying_type(T)>;