You got it! The compat-mode attribute allows your existing documents to be interpreted just as they always have.
In the new syntax, + characters are now used for passthrough consistently and the backtick is for monospaced formatting only. The best way to write C++ in monospaced text now is:
----
[x-]`C++` and more [x-]`C++`
----
or
----
`pass:[C++]` and more `pass:[C++]`
----
----
:cpp: C++
`{cpp}` and more `{cpp}`
----
In the first case, the x- role applies compatible behavior locally to that instance.
You are right in that there is no way to escape the ++ in C++ using a backslash. Fortunately, there are many other ways to write it.
This is such a common use case, I'm thinking we should add cpp as an implicit attribute for C++.
I am curious, why are you writing C++ in monospace text? If you don't need monospace, the syntax is much simpler:
----
pass:[C++] and more pass:[C++]
----
or
----
:cpp:
{cpp} and more {cpp}
----
Cheers,
-Dan
p.s. I also think we should cover this example in the docs since it's so common. Some test cases for it might always be good. Feel free to open issues for both.