🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #3818

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

#3818
From: Igor Boukanov
Date: Tue, 26 Mar 1996 18:56
33 lines
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                             ]
Technical Details
Message-ID: <4j9808$pg1@ugress.uib.no>
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage
From: boukanov@hadron.fi.uib.no (Igor Boukanov)
Newsgroups: comp.std.c++
Subject: Why "typedef int (*pf)() throw(int)" ill-formed?
Date: 26 Mar 1996 18:56:11 GMT
Organization: Fysisk institutt, Universitetet i Bergen
Approved: clamage@eng.sun.com (comp.std.c++)
Message-ID: <4j9808$pg1@ugress.uib.no>
NNTP-Posting-Host: taumet.eng.sun.com
Keywords: C++, excaptions
X-Nntp-Posting-Host: hadron.fi.uib.no
X-Newsreader: TIN [version 1.2 PL2]
Content-Length: 516
X-Lines: 26
Originator: clamage@taumet