Created on 2000-12-26.00:00:00 last changed 171 months ago
[ Redmond: More minor changes. Got rid of the footnote (which seems to make a sweeping normative requirement, even though footnotes aren't normative), and changed the sentence after the footnote so that it corresponds to the new code fragment. ]
[ Copenhagen: Minor change in the proposed resolution. Since this issue deals in part with C and C++ linkage, it was believed to be too confusing for the strings in the example to be "C" and "C++". ]
Proposed resolution:
Change [comparisons] paragraph 6 from:
[Example:
replace_if(v.begin(), v.end(), not1(bind2nd(ptr_fun(strcmp), "C")), "C++");replaces each C with C++ in sequence v.
to:
[Example:
int compare(const char*, const char*); replace_if(v.begin(), v.end(), not1(bind2nd(ptr_fun(compare), "abc")), "def");replaces each abc with def in sequence v.
Also, remove footnote 215 in that same paragraph.
The example in [comparisons], p6 shows how to use the C library function strcmp() with the function pointer adapter ptr_fun(). But since it's unspecified whether the C library functions have extern "C" or extern "C++" linkage [[using.linkage]], and since function pointers with different the language linkage specifications ([dcl.link]) are incompatible, whether this example is well-formed is unspecified.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg2112 |
2010-10-21 18:28:33 | admin | set | messages: + msg2111 |
2010-10-21 18:28:33 | admin | set | messages: + msg2110 |
2000-12-26 00:00:00 | admin | create |