This is undefined behavior in older versions of C++ (pre-C++11),
and is now "conditionally-supported" behavior (which means that
if it is supported, the compiler must document it). The only
case where "\N"
wouldn't be an error in the code is when it
actually targets a specific compiler extension.
I can very easily imagine a compiler treating "\N"
like
"\n"
, although I can't see any reason to use this feature.
(On the other hand, I can also imagine a compiler using "\e"
for the ESC characters, and code using this feature when
portability isn't an issue.)
From a quality of implementation point of view, I would expect an error unless the compiler actually does implement something defined (as an extension).