<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 87</TITLE>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<STYLE TYPE="text/css">
  INS { text-decoration:none; font-weight:bold; background-color:#A0FFA0 }
  .INS { text-decoration:none; background-color:#D0FFD0 }
  DEL { text-decoration:line-through; background-color:#FFA0A0 }
  .DEL { text-decoration:line-through; background-color: #FFD0D0 }
  @media (prefers-color-scheme: dark) {
    HTML { background-color:#202020; color:#f0f0f0; }
    A { color:#5bc0ff; }
    A:visited { color:#c6a8ff; }
    A:hover, a:focus { color:#afd7ff; }
    INS { background-color:#033a16; color:#aff5b4; }
    .INS { background-color: #033a16; }
    DEL { background-color:#67060c; color:#ffdcd7; }
    .DEL { background-color:#67060c; }
  }
  SPAN.cmnt { font-family:Times; font-style:italic }
</STYLE>
</HEAD>
<BODY>
<P><EM>This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21
  Core Issues List revision 118b.
  See http://www.open-std.org/jtc1/sc22/wg21/ for the official
  list.</EM></P>
<P>2025-09-28</P>
<HR>
<A NAME="87"></A><H4>87.
  
Exception specifications on function parameters
</H4>
<B>Section: </B>14.5&#160; [<A href="https://wg21.link/except.spec">except.spec</A>]
 &#160;&#160;&#160;

 <B>Status: </B>CD1
 &#160;&#160;&#160;

 <B>Submitter: </B>Steve Adamczyk
 &#160;&#160;&#160;

 <B>Date: </B>25 Jan 1999<BR>



<P>[Moved to DR at 4/01 meeting.]</P>

<P>In
14.5 [<A href="https://wg21.link/except.spec">except.spec</A>]

paragraph 2:</P>
<BLOCKQUOTE>An exception-specification shall appear only on a function
declarator in a function, pointer, reference or pointer to member declaration
or definition.</BLOCKQUOTE>
Does that mean in the top-level function declarator, or one at any level?
Can one, for example, specify an exception specification on a pointer-to-function
parameter of a function?
<PRE>
    void f(int (*pf)(float) throw(A))
</PRE>
Suggested answer: no. The exception specifications are valid only on the
top-level function declarators.

<P>However, if exception specifications are made part of a function's type
as has been tentatively agreed, they would have to be allowed on any function
declaration. </P>

<P>There is already an example
of an exception specification for a parameter in the example in
14.5 [<A href="https://wg21.link/except.spec#1">except.spec</A>] paragraph 1.
</P>

<P>
<B>Proposed resolution (04/01):</B>

Change text in 14.5 [<A href="https://wg21.link/except.spec#1">except.spec</A>] paragraph 1 from:</P>

<BLOCKQUOTE>An <I>exception-specification</I> shall appear only on
a function declarator in a function, pointer, reference or pointer to member
declaration or definition.</BLOCKQUOTE>
to:
<BLOCKQUOTE>

An <I>exception-specification</I> shall appear only on a function
declarator for a function type, pointer to function type, reference to
function type, or pointer to member function type that is the
top-level type of a declaration or definition, or on such a type
appearing as a parameter or return type in a function declarator.

</BLOCKQUOTE>
<P>(See also issues <A HREF="25.html">25</A>,
<A HREF="92.html">92</A>, and
<A HREF="133.html">133</A>.)</P>
<BR><BR>
</BODY>
</HTML>
