Removing Trigraphs

This lesson shows how trigraphs have evolved in C++17.

Trigraphs are special character sequences that could be used when a system doesn’t support 7-bit ASCII (like ISO 646). For example ??= generated #, ??- produced . (All of C++’s basic source character set fits in 7-bit ASCII).

Today, trigraphs are rarely used, and by removing them from the translation phase, the compilation process can be more straightforward.

See the table below with all the trighraps that were declared until C++17:

Trigraph Replacement
??= #
??( [
??< {
??/ \
??) ]
??> }
??’ ˆ
??! |
??- ~

Extra Info: The change was proposed in: N4086.

As you can see, C++ keeps updating its functionality. This is the end of our discussion on deprecated features.


In the next lessons, we’ll discuss the unstable feature​s which have been fixed rather than deprecated.

Get hands-on with 1200+ tech skills courses.