This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Const in default function arguments?
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: John Love-Jensen <eljay at adobe dot com>
- Cc: Eric Lemings <elemings at lemings dot com>, eric at lemings dot com, gcc-help at gcc dot gnu dot org
- Date: Sat, 05 Apr 2003 11:26:46 +0100
- Subject: Re: Const in default function arguments?
- Organization: Codesourcery LLC
- References: <BAB34004.807E%eljay@adobe.com>
John Love-Jensen wrote:
Hi Eric,
Can somebody not point to the standard that says you can't use a default
function argument for a non-const parameter?
but of course you can.
int &Foo ();
void Baz (int & = Foo ());
is just fine.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
The voices in my head said this was stupid too
nathan at codesourcery dot com : http://www.cs.bris.ac.uk/~nathan/ : nathan at acm dot org