PR c++/59268
* pt.c (tsubst_copy_and_build): Handle POINTER_PLUS_EXPR.
* g++.dg/cpp0x/constexpr-template6.C: New test.
From-SVN: r205674
+2013-12-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/59268
+ * pt.c (tsubst_copy_and_build): Handle POINTER_PLUS_EXPR.
+
2013-11-29 Marek Polacek <polacek@redhat.com>
PR sanitizer/59331
RETURN (r);
}
+ case POINTER_PLUS_EXPR:
+ return fold_build_pointer_plus (RECUR (TREE_OPERAND (t, 0)),
+ RECUR (TREE_OPERAND (t, 1)));
+
case SCOPE_REF:
RETURN (tsubst_qualified_id (t, args, complain, in_decl, /*done=*/true,
/*address_p=*/false));
+2013-12-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/59268
+ * g++.dg/cpp0x/constexpr-template6.C: New test.
+
2013-12-04 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/pack19.adb: New test.
--- /dev/null
+// PR c++/59268
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+
+template <typename>
+struct A
+{
+ constexpr A (int) {}
+ virtual void foo ()
+ {
+ constexpr A<void> a (0);
+ }
+};
+
+void
+bar ()
+{
+ A<int> a (3);
+ a.foo ();
+}