#include <stdio.h>
struct{int a; float b;} test()
{
return (typeof(test())){1337, 666.666};
}
int main()
{
auto a = test();
printf("%d %f\n", a.a, a.b);
return 0;
}
А вот в С++ такого нельзя:
error: new types may not be defined in a return type
Товарищи из комитета, отстаете. Где эти безусловно нужные всем языковые фичи?