PR c++/85462
[official-gcc.git] / gcc / testsuite / g++.dg / expr / stmt-expr-1.C
blobc4db5157f5a0808ad37e8f76c629bb8b65f4f221
1 // Contributed by Dodji Seketeli <dodji@redhat.com>
2 // Origin PR c++/40866
3 // { dg-options "-std=gnu++98" }
4 // { dg-do compile }
6 template <typename T> class QForeachContainer {
7 public:
8     QForeachContainer();
9     int brk;
10     typename T::const_iterator i;
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     };
22 class QAction;
23 class QWidget {
24 public:
25     QList<QAction*> actions() const;
27 class myDialog : public QWidget {
28     myDialog();
31 myDialog::myDialog()
33     QForeachContainer<__typeof__(actions())> _container_;
34     ({++_container_.brk; ++_container_.i;});