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

2024-03-20


1016. Overloadable declarations, function templates, and references

Section: Clause 12  [over]     Status: C++11     Submitter: Johannes Schaub     Date: 2009-12-27

[Voted into the WP at the November, 2010 meeting.]

According to Clause 12 [over] paragraph 1,

Only function declarations can be overloaded; object and type declarations cannot be overloaded.

There are two problems with this statement. First, it does not allow for overloading function templates. (There may be other places in the Standard that refer to “functions” but should include function templates, as well.)

Second, the restriction on “object” declarations should presumably be on “variable” declarations instead, since one can also not overload reference declarations.

Proposed resolution (September, 2010):

Change Clause 12 [over] paragraph 1 as follows:

...Only function and function template declarations can be overloaded; object variable and type declarations cannot be overloaded.