We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__VA_OPT__ is a very useful feature.
__VA_OPT__
Implementations enable it across all std modes (though nominally C++20 / C23). It ousts non-standard use of the 'comma eating' __VA_ARGS__ extension.
__VA_ARGS__
There's no feature-test macro but it's detectable using a snippet from SO
#define VA_ARG1(A0,A1,...) A1 #define VA_EMPTY(...) VA_ARG1(__VA_OPT__(,)0,1,) // (Detects __VA_OPT__) // VA_EMPTY(?) is true if __VA_OPT__ is supported
The idea to use #ifdef __VA_OPT__ for detection was considered but dropped - see Richard Smith's comment here https://reviews.llvm.org/D91913#2526276
#ifdef __VA_OPT__
It seems ok to enable by default and disable via a commandline flag.
The text was updated successfully, but these errors were encountered:
C++ draft link, includes useful examples for testing purposes https://eel.is/c++draft/cpp.subst#nt:va-opt-replacement
Sorry, something went wrong.
No branches or pull requests
__VA_OPT__
is a very useful feature.Implementations enable it across all std modes (though nominally C++20 / C23).
It ousts non-standard use of the 'comma eating'
__VA_ARGS__
extension.There's no feature-test macro but it's detectable using a snippet from SO
The idea to use
#ifdef __VA_OPT__
for detection was considered but dropped -see Richard Smith's comment here https://reviews.llvm.org/D91913#2526276
It seems ok to enable by default and disable via a commandline flag.
The text was updated successfully, but these errors were encountered: