Browsed by
Month: January 2022

PreProcessor Overloading

PreProcessor Overloading

While it is simple to overload methods in C++, the preprocessor doesn’t work the same way. To define overloaded methods in the preprocessor, we need to define a method for each number of arguments we want to overload. Option 1: https://stackoverflow.com/questions/11761703/overloading-macro-on-number-of-arguments However, this method is not the most portable, and sometimes doesn’t work with MSVC, so a better approach is using the solution from rextester ONP80107. Option 2: However, this solution doesn’t work out of the box on Windows, as…

Read More Read More