OSDN Git Service

PR c++/48261
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / cond.C
1 // PR c++/8080
2
3 // Bug: the transformation in finish_while_stmt_cond produced something
4 // that tsubst_expr handled badly.  Fixed by not doing the transformation
5 // while parsing a template.
6
7 class TObject {};
8
9 struct TIter {
10   TObject           *operator()();
11 };
12
13
14 template<class T>
15 void get_root_object(TIter& iobj) {
16   while ( TObject* pnew_obj = iobj() )
17     ;
18 }
19
20 void foo(TIter& iobj)
21 {
22   get_root_object<int>(iobj);
23 }