Debian Codegraph @

gcc/testsuite/g++.dg/expr/stmt-expr-1.C

raw
1 // Contributed by Dodji Seketeli <[email protected]>
2 // Origin PR c++/40866
3 // { dg-options "-std=gnu++98" }
4 // { dg-do compile }
5
6 template <typename T> class QForeachContainer {
7 public:
8 QForeachContainer();
9 int brk;
10 typename T::const_iterator i;
11 };
12
13 template <typename T> class QList {
14 public:
15 class const_iterator {
16 public:
17 const_iterator(const const_iterator &o);
18 const_iterator &operator++();
19 };
20 };
21
22 class QAction;
23 class QWidget {
24 public:
25 QList<QAction*> actions() const;
26 };
27 class myDialog : public QWidget {
28 myDialog();
29 };
30
31 myDialog::myDialog()
32 {
33 QForeachContainer<__typeof__(actions())> _container_;
34 ({++_container_.brk; ++_container_.i;});
35 }
36