I have recently seen blocks of C++ code where there is a "\" after each semicolon. It seems very odd to me. Perhaps it is nothing more than a mistake or the remnants of some long forgotten comments (although those have a forward slash "/" ). What impact would this "\" have on the code?
Her is a code sample.
#define PE_DECLARE_CLASS(class_) \
typedef class_ MyClass; \
static void setSuperClasses(); \
A backslash as last character in a line causes this line to be joined with the next for preprocessing. For regular C++ parsing newlines are simply whitespace, so this does not matter. But preprocessor directives, in particular macro definitions end at the end of line.
Using a backslash for line continuation allows formatting long macro bodies across multiple source text lines.