[PATCH v2] New mechanism for declaring const-covariant string functions.
Florian Weimer
fweimer@redhat.com
Tue Nov 22 09:05:00 GMT 2016
On 11/21/2016 06:46 PM, Zack Weinberg wrote:
> diff --git a/string/bits/const-covariance.h b/string/bits/const-covariance.h
> +#define __CC_VA_NARGS(...) __CC_VA_NARGS_(__VA_ARGS__, __CC_RSEQ)
> +#define __CC_VA_NARGS_(...) __CC_VA_NARGS__(__VA_ARGS__)
> +#define __CC_VA_NARGS__(_1, _2, _3, _4, _5, _6, _7, _8, N, ...) N
> +#define __CC_RSEQ 8, 7, 6, 5, 4, 3, 2, 1
It's not clear to me what ensures that variadic macros are available at
this point. <bits/const-covariance.h> seems to be included
unconditionally, not just for GNU or C++11. I don't think you can use
variadic macros for this.
Florian
More information about the Libc-alpha
mailing list