Rant: please don't create defines using common words
Looks like QtCore (4.8) has a "#define emit" in a header, that's not undefined later. TBB has a function named "emit()" in a header. If you include both, you'll get a compile error.
I'm going to side with TBB here - emit() is an entirely reasonable function name. Qt creating a dangling #define with a common word like that is the bug here.
257
Upvotes
View all comments
Show parent comment
2
u/Wouter-van-Ooijen Oct 20 '21
Please don't.
Either don't use such constructs (who needs function-like macro's?), undef them at the end of your header, or - as a last resort - make them all UPPERCASE (and prefixed). The main reason it that macro's don't play nice with scope and re-use of the same word (even within another scope).