Debian Codegraph @

gcc/testsuite/g++.dg/torture/pr34651.C

raw
1 /* { dg-do compile } */
2
3 typedef bool Bool;
4 struct CString {
5 CString (const char * =__null);
6 CString & operator += (const CString &);
7 };
8 struct THotKey {
9 short Key;
10 Bool Control;
11 Bool Shift;
12 Bool Alt;
13 };
14 THotKey m_HotKey;
15 THotKey GetHotKey () { return m_HotKey; }
16 void Serialize ()
17 {
18 THotKey inHotKey (GetHotKey());
19 CString outCombinaison (inHotKey.Control
20 ? ((inHotKey.Alt || inHotKey.Shift)
21 ? "ctrl+" : "ctrl")
22 : __null);
23 outCombinaison += inHotKey.Alt ? inHotKey.Shift ? "alt+" : "alt" : "";
24 outCombinaison += inHotKey.Shift ? "shift" : "";
25 }