Const in default function arguments?

Nathan Sidwell nathan@codesourcery.com
Sat Apr 5 10:27:00 GMT 2003


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@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org




More information about the Gcc-help mailing list