Thread View: comp.std.c++
1 messages
1 total messages
Started by Igor Boukanov
Tue, 26 Mar 1996 18:56
Why "typedef int (*pf)() throw(int)" ill-formed?
Author: Igor Boukanov
Date: Tue, 26 Mar 1996 18:56
Date: Tue, 26 Mar 1996 18:56
33 lines
1503 bytes
1503 bytes
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 ]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads