bearophile <[email protected]> wrote:

Simen kjaeraas:

Perhaps it would be possible to augment struct static initializers for
this purpose?

{ int a; string b } foo( ) {
     return { 1, "text" };
}

What kind of tuple unpacking syntax do you suggest for this? (I think at the moment the unpacking syntax is more important than the literals one).

int a;
string b;
{ a, b } = foo( );

string s = "123456"
char c;
{ c, s... } = s;

I guess.

--
Simen

Reply via email to