/Zc:trigraphs (Trigraphs Substitution)
When /Zc:trigraphs is specified, the compiler replaces a trigraph character sequence by using a corresponding punctuation character.
A trigraph consists of two consecutive question marks ("??") followed by a unique third character. The C language standard supports trigraphs for source files that use a character set that does not contain convenient graphic representations for some punctuation characters. For example, when trigraphs are enabled, the compiler replaces the "??=" trigraph by using the '#' character. Through C++14, trigraphs are supported as in C. The C++17 standard removes trigraphs from the C++ language. In C++ code, the /Zc:trigraphs compiler option enables substitution of trigraph sequences by the corresponding punctuation character. /Zc:trigraphs- disables trigraph substitution.
The /Zc:trigraphs option is off by default, and the option is not affected when the /permissive- option is specified.
For a list of C/C++ trigraphs, and an example that shows how to use trigraphs, see Trigraphs.
To set this compiler option in the Visual Studio development environment
Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.
Select the Configuration Properties > C/C++ > Command Line property page.
Modify the Additional Options property to include /Zc:trigraphs or /Zc:trigraphs- and then choose OK.
Send feedback about: