-
Type:
Task
-
Resolution: Fixed
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
Fully Compatible
-
170
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The expression.h registration macros could be refactored to use REGISTER_EXPRESSION_CONDITIONALLY rather than all calling MONGO_INITIALIZER_GENERAL and registerExpression .
Currently if we try to refactor them this results in a compilation error on the Windows variants (see BF-25979)
src\mongo\db\pipeline\expression.cpp(571,1): error C2143: syntax error: missing ';' before '&&' REGISTER_STABLE_EXPRESSION(and, ExpressionAnd::parse);
This seems to be because the word 'and' in the Windows preprocessor is a macro for && : https://gcc.gnu.org/onlinedocs/cpp/C_002b_002b-Named-Operators.html#C_002b_002b-Named-Operators
We should look into if it's possible to get around this