When using \
to continue a line, are spaces allowed after the backslash (on the same line)?
A new-line character should go immediately after a backslash. The C++ standard (N4140
) states:
2.2 Phases of translation
....Each instance of a backslash character (
\
) immediately followed by a new-line character is deleted, splicing physical source lines to form logical source lines. Only the last backslash on any physical source line shall be eligible for being part of such a splice.
(The C standard has the same rules in 5.1.1.2 Translation phases.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With