diff options
Diffstat (limited to 'gcc/cp/constexpr.c')
-rw-r--r-- | gcc/cp/constexpr.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 18d9d11..e95ff00 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -9043,6 +9043,16 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, case CO_RETURN_EXPR: return false; + case NONTYPE_ARGUMENT_PACK: + { + tree args = ARGUMENT_PACK_ARGS (t); + int len = TREE_VEC_LENGTH (args); + for (int i = 0; i < len; ++i) + if (!RECUR (TREE_VEC_ELT (args, i), any)) + return false; + return true; + } + default: if (objc_non_constant_expr_p (t)) return false; |