is there a way to use the compiler directives to accomplish something like the following?
#define ENABLE_DOUBLEWIDE_ATOMICS true
#if ENABLE_DOUBLEWIDE_ATOMICS
#else
#endif
Alejandro
(Alejandro Alonso)
2
-D ENABLE_DOUBLEWIDE_ATOMICS
apparently discourse won't let me just send the flag, so here is a sentence.
that is how you do it by customizing the build invocation, but how do you do it unconditionally within the source file?
the context is:
Alejandro
(Alejandro Alonso)
4
I don't believe there is a way to do it in Swift source today.
1 Like
tera
5
Every now and then when I am reaching out for it I wish we had it:
#define someSwitch
#if someSwitch
// works
#else
// as expected
#endif
1 Like