This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 110c. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
[Voted into the WP at the March, 2011 meeting.]
The resolution to issue 195 makes “converting a pointer to a function into a pointer to an object type or vice versa” conditionally-supported behavior. In doing so, however, it overlooked the fact that void is not an “object type” (6.8 [basic.types] paragraph 9). The wording should be amended to allow conversion to and from void* types.
Proposed resolution (November, 2010):
Change _N4885_126.96.36.199.4 [basic.stc.dynamic.safety] paragraphs 1-2 as follows:
A traceable pointer object is
an object of
pointer-to-objecttype , or
an object of an integral type that is at least as large as std::intptr_t, or
a sequence of elements in an array of character type, where the size and alignment of the sequence match
thatof some pointer-to-objecttype.
A pointer value is a safely-derived pointer to a dynamic object only if it has
pointer-to-objecttype and it is...
Change 6.8.4 [basic.compound] paragraphs 3-4 as follows:
A pointer to objects of type T is referred to as a “pointer to T.” [Example:...
Objects of cv-qualified (6.8.5 [basic.type.qualifier]) or cv-unqualified type void* (pointer to void),can be used to point to objects of unknown type. A void*shall be able to hold any object pointer. A cv-qualified or cv-unqualified (6.8.5 [basic.type.qualifier])void* shall have the same representation and alignment requirements as a cv-qualified or cv-unqualifiedchar*.
Change 7.3.12 [conv.ptr] paragraph 1 as follows:
...A null pointer constant can be converted to a pointer type; the result is the null pointer value of that type and is distinguishable from every other value of
pointer to object or pointer to functiontype...
Change 7.3.13 [conv.mem] paragraph 2 footnote 58 as follows:
...Note that a pointer to member is not
a pointer to object or a pointer to functionand...
Change 188.8.131.52 [expr.reinterpret.cast] paragraphs 6-8 as follows:
pointer to afunction can be explicitly converted to a pointer to afunction of a different type...
A pointer to anobject can be explicitly converted to a pointer to a different object type...
pointer to a function into a pointer to an objecttype or vice versa is conditionally-supported...
Change the note in 184.108.40.206 [dcl.fct] paragraph 6 as follows:
[Note: function types are checked during the assignments and initializations of
pointer-to-functions, reference-to-functions, and pointer-to-member-functions. —end note]
In the “Index of Implementation-defined Behavior,” change the following item as indicated:
pointer to function into pointer to objectand vice versa
[Drafting note: 220.127.116.11 [expr.delete] paragraph 1 was not changed, so the operand of delete still cannot be a void*. 12.5 [over.built] paragraph 14 was not changed, so void* pointers still do not get overloads for operator-. 13.2 [temp.param] paragraph 4 was not changed and thus continues to allow only pointers to objects, not object pointers, as non-type template parameters.]
(See also issue 1120.)