Topic: Why "typedef int (*pf)() throw(int)" ill-formed?


Author: boukanov@hadron.fi.uib.no (Igor Boukanov)
Date: 1996/03/26
Raw View
   From September DWP,  15.4.1:
...
An exception-specification shall  not appear in a typedef declaration.
[Example:
...
typedef int (*pf)() throw(int);  // ill-formed
--end example]


So instead of
typedef int (*pa)(int) throw();
typedef int (*pf)(pa) throw();
pf array[10];

one have to write:
int (*array[10])(int (*)(int) throw()) throw();

or
#define pa(name) int (*(name))(int) throw()
#define pb(name) int (*(name))(pa(arg)) throw()
pb(array[10]);

?

--
Regards, Igor Boukanov (igor.boukanov@fi.uib.no).


[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]