This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of TC1 status.

147. Library Intro refers to global functions that aren't global

Section: [global.functions] Status: TC1 Submitter: Lois Goldthwaite Opened: 1999-06-04 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [global.functions].

View all issues with TC1 status.


The library had many global functions until [lib.contents] paragraph 2 was added:

All library entities except macros, operator new and operator delete are defined within the namespace std or namespaces nested within namespace std.

It appears "global function" was never updated in the following: - Global functions []

-1- It is unspecified whether any global functions in the C++ Standard Library are defined as inline (dcl.fct.spec).

-2- A call to a global function signature described in Clauses through lib.input.output behaves the same as if the implementation declares no additional global function signatures.*

[Footnote: A valid C++ program always calls the expected library global function. An implementation may also define additional global functions that would otherwise not be called by a valid C++ program. --- end footnote]

-3- A global function cannot be declared by the implementation as taking additional default arguments. - Member functions [lib.member.functions]

-2- An implementation can declare additional non-virtual member function signatures within a class:

-- by adding arguments with default values to a member function signature; The same latitude does not extend to the implementation of virtual or global functions, however.

Proposed resolution:

Change "global" to "global or non-member" in: [] section title, [] para 1, [] para 2 in 2 places plus 2 places in the footnote, [] para 3, [lib.member.functions] para 2


Because operator new and delete are global, the proposed resolution was changed from "non-member" to "global or non-member.