/cp
2013-12-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59435
* parser.c (cp_parser_cache_defarg): sizeof ... ( p ) can
occur in a default argument too.
/testsuite
2013-12-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59435
* g++.dg/cpp0x/variadic-sizeof3.C: New.
From-SVN: r205836
+2013-12-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/59435
+ * parser.c (cp_parser_cache_defarg): sizeof ... ( p ) can
+ occur in a default argument too.
+
2013-12-06 Caroline Tice <cmtice@google.com>
Submitting patch from Stephen Checkoway, s@cs.jhu.edu
case CPP_CLOSE_SQUARE:
if (depth == 0
/* Handle correctly int n = sizeof ... ( p ); */
- && !(nsdmi && token->type == CPP_ELLIPSIS))
+ && token->type != CPP_ELLIPSIS)
done = true;
/* Update DEPTH, if necessary. */
else if (token->type == CPP_CLOSE_PAREN
+2013-12-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/59435
+ * g++.dg/cpp0x/variadic-sizeof3.C: New.
+
2013-12-09 David Malcolm <dmalcolm@redhat.com>
* g++.dg/plugin/selfassign.c (execute_warn_self_assign): Eliminate
--- /dev/null
+// PR c++/59435
+// { dg-require-effective-target c++11 }
+
+template <typename... E>
+struct T
+{
+ T(unsigned int i = sizeof...(E)){} // does not compile
+
+ static constexpr unsigned int U = sizeof...(E);
+ T(unsigned int j, unsigned int i = U){} // compile
+};
+
+template <typename... T>
+void test(int i = sizeof...(T)) // compile
+{}