185. Questionable use of term "inline"

Section: 23.14 [function.objects] Status: CD1 Submitter: UK Panel Opened: 1999-07-26 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [function.objects].

View all issues with CD1 status.

Discussion:

Paragraph 4 of 23.14 [function.objects] says:

 [Example: To negate every element of a: transform(a.begin(), a.end(), a.begin(), negate<double>()); The corresponding functions will inline the addition and the negation. end example]

(Note: The "addition" referred to in the above is in para 3) we can find no other wording, except this (non-normative) example which suggests that any "inlining" will take place in this case.

Indeed both:

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 (7.1.2).

and

17.4.4.4 Member Functions [lib.member.functions] 1 It is unspecified whether any member functions in the C++ Standard Library are defined as inline (7.1.2).

take care to state that this may indeed NOT be the case.

Thus the example "mandates" behavior that is explicitly not required elsewhere.

Proposed resolution:

In 23.14 [function.objects] paragraph 1, remove the sentence:

They are important for the effective use of the library.

Remove 23.14 [function.objects] paragraph 2, which reads:

Using function objects together with function templates increases the expressive power of the library as well as making the resulting code much more efficient.

In 23.14 [function.objects] paragraph 4, remove the sentence:

The corresponding functions will inline the addition and the negation.

[Kona: The LWG agreed there was a defect.]

[Tokyo: The LWG crafted the proposed resolution.]