summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/expr/stmt-expr-1.C
blob: c4db5157f5a0808ad37e8f76c629bb8b65f4f221 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR c++/40866
// { dg-options "-std=gnu++98" }
// { dg-do compile }

template <typename T> class QForeachContainer {
public:
    QForeachContainer();
    int brk;
    typename T::const_iterator i;
};

template <typename T> class QList {
public:
    class const_iterator {
    public:
        const_iterator(const const_iterator &o);
        const_iterator &operator++();
    };
};

class QAction;
class QWidget {
public:
    QList<QAction*> actions() const;
};
class myDialog : public QWidget {
    myDialog();
};

myDialog::myDialog()
{
    QForeachContainer<__typeof__(actions())> _container_;
    ({++_container_.brk; ++_container_.i;});
}