On Sat, Dec 29, 2018 at 12:33:18AM -0200, Alexandre Oliva wrote: > --- a/gcc/cp/typeck2.c > +++ b/gcc/cp/typeck2.c > @@ -918,7 +918,11 @@ check_narrowing (tree type, tree init, tsubst_flags_t > complain, bool const_only) > return ok; > } > > - init = maybe_constant_value (init); > + /* Immediate subexpressions in BRACED_ENCLOSED_INITIALIZERs are > + potentially constant evaluated. Without manifestly_const_eval,
The term in latest draft is manifestly constant-evaluated. > + we won't instantiate constexpr functions that we must > + instantiate. */ > + init = maybe_constant_value (init, NULL_TREE, > /*manifestly_const_eval=*/true); If this is a right change, then it should be covered also by a testcase that makes sure __builtin_is_constant_evaluated () in those initializers evaluates to true in a new g++.dg/cpp2a/is-constant-evaluated-*.C testcase. Jakub