|
|
|
|
|
by floatms
2250 days ago
|
|
1. How likely are named constants of any types to be included in C2x? I'm referring to the idea of making register const values be usable in constant expressions. 2. Is there, or was there ever a proposal to make struct types without a tag be structurally typed? This would not break backwards compatibility as far as I can see, and would make these types much more useful as ad-hoc bags of data.
Small example: struct {size_t size; void *data;} data = get_data();
int hash = hash_data(data);
I believe there was at least one proposal about error handling that more or less relied on the above to be valid semantically.3. Is there any interest in making the variadic function interface a bit nicer to use?
I would like to bring back an old feature and have an intrinsic to extract a pointer from the variadic parameter list, so that we can iterate over it ourselves (or even index directly). void *arg_ptr = va_ptr(last);
More out there would be a parameter that would be implicitly passed to a variadic function to indicate the number of arguments. void variadic(..., va_size count) {
}
variadic(10, 20, 30); // count would be three
|
|
1. I want this too.
2. Here is my proposal: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2366.pdf
3. Yes, variadic functions should be improved.