https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88816

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #1)
> See PR 85577 (and PR 86135).
> 
> Use parens instead of braces and it works:
> 
>     new(&u.array_elements) array_type(a);

Basically, if you're trying to call the array_type copy constructor then don't
use array_type{a} when array_type has an initializer-list constructor and a is
convertible to the value_type. If you use braces the compiler thinks you're
trying to do array_type{initializer_list<Value>{a}}, i.e. create a vector with
one element copied from a. It converts a to Value, which calls back into the
same constructor and recurses.

Reply via email to