|
P99
|
Construct a compound literal of type TYPE by copying fields of VAR. The argument list must be composed of designators, something like struct toto { int a; int b; } A = { .a = 9, .b = 7 }; struct toto B = P99_LCOPY(struct toto, A, .b); double C[4] = { 1, 2, 3, 4 }; double *D = P99_LCOPY(double[4], C, [0], [2]); So here This is probably best used indirectly inside a type specific macro. E.g if you know that the copy operation for #define TOTO_LCOPY(A) P99_LCOPY(struct toto, A, .b); struct toto B = TOTO_LCOPY(A);
|
1.7.6.1