We all know about the historical curiosity that is digraphs and trigraphs, but with all the changes made to C++ in recent years I'm curious: are they valid C++14? How about C++17?
            Asked
            
        
        
            Active
            
        
            Viewed 1,595 times
        
    10
            
            
        - 
                    2I'm afraid they're still valid constructs. – πάντα ῥεῖ Dec 28 '14 at 16:27
- 
                    2historical curiosity is that we still use this http://en.wikipedia.org/wiki/Typewriter#mediaviewer/File:1920s_Underwood_SE_layout.JPG – mip Dec 28 '14 at 16:28
1 Answers
16
            Trigraphs are currently valid, but won't be for long!
Trigraphs were proposed for deprecation in C++0x, which was released as C++11. This was opposed by IBM, speaking on behalf of itself and other users of C++, and as a result trigraphs were retained in C++0x. Trigraphs were then proposed again for removal (not only deprecation) in C++17. This passed a committee vote, and trigraphs are expected to be removed from C++17 despite the opposition from IBM and others. Existing code that uses trigraphs can be supported by translating from the physical source files (parsing trigraphs) to the basic source character set that does not include trigraphs. [Wikipedia]
Digraphs, however, are sticking around for now.
 
    
    
        Community
        
- 1
- 1
 
    
    
        Lightness Races in Orbit
        
- 378,754
- 76
- 643
- 1,055
- 
                    5The [current C++17 draft](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf) is probably a better reference. (in particular, `C.4.1[diff.cpp14.lex]`) – Cubbi Dec 28 '14 at 20:15
- 
                    2