Far from an oversight, it was one of the more hotly debated corners. The preprocessor is often abused, but it's part of the language. It has too many useful applications to reject ubiquitously over unmotivated use cases like "not calling the compiler".
You're building C++, you have a compiler available. No reason to reject using it.
Agreed, more asking to satisfy my curiosity. Now that we have support for scanners I don't see any major objections, but when I first (mis)read the spec years ago it seemed like the goal was to make this trivially parseable, which does not seem like the case.
View all comments
Show parent comment
3
u/not_a_novel_account cmake dev Mar 10 '26
Far from an oversight, it was one of the more hotly debated corners. The preprocessor is often abused, but it's part of the language. It has too many useful applications to reject ubiquitously over unmotivated use cases like "not calling the compiler".
You're building C++, you have a compiler available. No reason to reject using it.