A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/CWG/issues/1716.html below:

CWG Issue 1716

This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-08-11

1716. When are default arguments evaluated?Section: 9.3.4.7  [dcl.fct.default]     Status: C++14     Submitter: David Krauss     Date: 2013-07-17

[Moved to DR at the February, 2014 meeting.]

According to 9.3.4.7 [dcl.fct.default] paragraph 9,

Default arguments are evaluated each time the function is called.

Obviously, what was intended by this is that the default argument is evaluated only if no corresponding actual argument is provided, but this could be read as indicating that the default argument is evaluated and discarded by every function call.

Proposed resolution (January, 2014):

Change 9.3.4.7 [dcl.fct.default] paragraph 9 as follows:

Default arguments are A default argument is evaluated each time the function is called with no argument for the corresponding parameter. The order of evaluation...

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4