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: 16.4.6.4 [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.

Discussion:

The library had many global functions until 17.4.1.1 [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:

17.4.4.3 - Global functions [lib.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 lib.language.support 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. 

17.4.4.4 - 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:

17.4.4.3 [lib.global.functions] section title,
17.4.4.3 [lib.global.functions] para 1,
17.4.4.3 [lib.global.functions] para 2 in 2 places plus 2 places in the footnote,
17.4.4.3 [lib.global.functions] para 3,
17.4.4.4 [lib.member.functions] para 2

Rationale:

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