2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / template / cond.C
blob394a21c9a6ba3b2546dda67cd44aa56f6cd7b527
1 // PR c++/8080
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.
7 class TObject {};
9 struct TIter {
10   TObject           *operator()();
14 template<class T>
15 void get_root_object(TIter& iobj) {
16   while ( TObject* pnew_obj = iobj() )
17     ;
20 void foo(TIter& iobj)
22   get_root_object<int>(iobj);