I asked a question here about assert
which is implemented in the standard as a macro, not a function.
This had caused me an issue because the way that assert
appears to be a function in the way it takes a parameter: assert(true)
Thus I tried to use it as: std::assert(true)
and of course being a macro that didn't work.
My question is this: Are there any other macros provided by the standard library which would appear as functions that take parameters?
If we look at [headers] paragraphs 5 and 6 we have
So, if it is defined as a macro in C, it will be a macro in C++. There are a couple of exceptions though. from [support.runtime] paragraphs 7 and 8
Although that those exceptions are covered by [headers]/7 as well
There is also an exception that all classification macros defined in 7.12.3 Classification macros be overloaded by functions per [c.math]/10