Last active
April 22, 2022 09:43
-
-
Save csknns/c76a3c8ed8e291eed1e2eb5b8ebcd3e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Helper macros to convert a preprocessor token to String | |
#define xstr(s) str(s) | |
#define str(s) #s | |
// Example of compile time assertions to validate that tha macro argument was not empty | |
// and avoid building a application that will fail at runtime | |
// Clang and gcc are both able to compute this at compile-time, you can use sizeOf() | |
// instead of the build-in method here. | |
_Static_assert(__builtin_strlen(xstr(OAUTH_CLIENT_ID)) > 0, | |
"The OAUTH_CLIENT_ID is missing"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment