PR c++/63415
* pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
(iterative_hash_template_arg): Likewise.
From-SVN: r216043
2014-10-09 Jason Merrill <jason@redhat.com>
+ PR c++/63415
+ * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
+ (iterative_hash_template_arg): Likewise.
+
PR c++/63437
* cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
* semantics.c (force_paren_expr): And set it.
case CONSTRUCTOR:
{
tree field, value;
+ iterative_hash_template_arg (TREE_TYPE (arg), val);
FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (arg), i, field, value)
{
val = iterative_hash_template_arg (field, val);
{
unsigned ix;
tree val;
+ if (dependent_type_p (TREE_TYPE (expression)))
+ return true;
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (expression), ix, val)
if (value_dependent_expression_p (val))
return true;
--- /dev/null
+// PR c++/63415
+// { dg-do compile { target c++11 } }
+
+template <typename T>
+struct A {
+ static constexpr int value = int(T{});
+};