Jason Merrill <ja...@redhat.com> writes: | In the discussion of 48760, Gaby suggested that we allow | list-initialization of built-in complex numbers. This made a lot of | sense to me, so I've gone ahead and implemented it. | | Basically it works as though complex were an aggregate except for one | thing: for backwards compatibility, we never assume elided braces when | initializing a complex number. So given | | struct A | { | _Complex int c; | int i; | }; | | A a = { 1, 2 }; | | a.c is initialized to 1+0i rather than 1+2i as it has been previously, | and a.i is initialized to 2.
Many thanks, Jason. -- Gaby