Title
Questionable use of term "inline"
Status
cd1
Section
[function.objects]
Submitter
UK Panel

Created on 1999-07-26.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

[ Tokyo: The LWG crafted the proposed resolution. ]

Date: 2010-10-21.18:28:33

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

Date: 2010-10-21.18:28:33

Proposed resolution:

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

They are important for the effective use of the library.

Remove [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 [function.objects] paragraph 4, remove the sentence:

The corresponding functions will inline the addition and the negation.

Date: 1999-07-26.00:00:00

Paragraph 4 of [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.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg1792
2010-10-21 18:28:33adminsetmessages: + msg1791
2010-10-21 18:28:33adminsetmessages: + msg1790
1999-07-26 00:00:00admincreate