This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115f. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-12-06
[Moved to DR at the October, 2012 meeting.]
Split off from issue 315.
Incidentally, another thing that ought to be cleaned up is the inconsistent use of "indirection" and "dereference". We should pick one.
Proposed resolution (December, 2006):
Change 7.6.2.2 [expr.unary.op] paragraph 1 as follows:
The unary * operatorperforms indirectiondereferences a pointer value: the expression to which it is applied shall be a pointer...
Change 9.3.4.5 [dcl.array] paragraph 8 as follows:
Theresults are added and indirection appliedvalues are added and the result is dereferenced to yield an array (of five integers), which in turn is converted to a pointer to the first of the integers.
Change 9.3.4.6 [dcl.fct] paragraph 9 as follows:
The binding of *fpi(int) is *(fpi(int)), so the declaration suggests, and the same construction in an expression requires, the calling of a function fpi, and thenusing indirection throughdereferencing the (pointer) result to yield an integer. In the declarator (*pif)(const char*, const char*), the extra parentheses are necessary to indicate thatindirection throughdereferencing a pointer to a function yields a function, which is then called.
Change the index for * and “dereferencing” no longer to refer to “indirection.”
[Drafting note: 28.6.9 [template.indirect.array] requires no change. Many more places in the current wording use “dereferencing” than “indirection.”]
Notes from the August, 2011 meeting:
CWG prefers use of the term “indirection” instead of “dereferencing.” This would be consistent with the usage in the C Standard and would avoid entanglement with the C++ concept of a reference type.
Proposed resolution (February, 2012):
Change 6.7.5.5.2 [basic.stc.dynamic.allocation] paragraph 2 as follows:
...The effect ofdereferencingindirecting through a pointer returned as a request for zero size is undefined.
Change _N4885_6.7.5.5.4 [basic.stc.dynamic.safety] paragraph 2 as follows:
the value returned by a call to the C ++ standard library implementation of ::operator new(std:: size_t); [Footnote: This section does not impose restrictions on
dereferencingindirection through pointers to memory not allocated by ::operator new. This maintains the ability of many C++ implementations to use binary libraries and components written in other languages. In particular, this applies to C binaries, becausedereferencingindirection through pointers to memory allocated by std::malloc is not restricted. —end footnote]the result of taking the address of an object (or one of its subobjects) designated by an lvalue resulting from
dereferencingindirection through a safely-derived pointer value;...
Change 6.7.3 [basic.life] paragraph 5 as follows:
...SuchIndirection through such a pointermay be dereferencedis permitted but the resulting lvalue may only be used in limited ways...
Change 7.3.13 [conv.mem] paragraph 2 as follows:
...Since the result has type “pointer to member of D of type cv T”,it can be dereferencedindirection through it with a D object is valid. The result is the same as if indirecting through the pointer to member of Bwere dereferencedwith the B subobject of D. The null member pointer value...
Change 7.6.1.9 [expr.static.cast] paragraph 12 as follows:
...[Note: although class B need not contain the original member, the dynamic type of the objectonwith which indirection through the pointer to member isdereferencedperformed must contain the original member; see 7.6.4 [expr.mptr.oper]. —end note]
Change 7.6.2.2 [expr.unary.op] paragraph 1 as follows:
...[Note: indirection through a pointer to an incomplete type (other than cv void)can be dereferencedis valid. The lvalue thus obtained...
Change 7.6.10 [expr.eq] paragraph 2 as follows:
...Otherwise they compare equal if and only if they would refer to the same member of the same most derived object (6.7.2 [intro.object]) or the same subobject ifthey were dereferencedindirection with a hypothetical object of the associated class type were performed. [Example:...
Change 9.11 [dcl.link] paragraph 8:
[Note: Because the language linkage is part of a function type, when indirecting through a pointer to C function(for example) is dereferenced, the function to whichitthe resulting lvalue refers is considered a C function. —end note]
Change 9.3.4.3 [dcl.ref] paragraph 5 as follows:
...[Note: in particular, a null reference cannot exist in a well-defined program, because the only way to create such a reference would be to bind it to the “object” obtained bydereferencingindirection through a null pointer, which causes undefined behavior. As described...
Change 16.4.4.6 [allocator.requirements] table 27:
Variable Definition ... c a dereferenceablepointer of type C* through which indirection is valid...
Change 20.2.3.3 [pointer.traits.functions] as follows:
Returns: The first member function returns adereferenceablepointer to r obtained by calling Ptr::pointer_to(r) through which indirection is valid; an instantiation of this function is ill-formed...
Change _N4885_.20.10.5 [util.dynamic.safety] paragraph 10 as follows:
Effects: The n bytes starting at p no longer contain traceable pointer locations, independent of their type. Hencepointersindirection through a pointer located theremay not be dereferencedis undefined if the objectthey pointit points to was created by global operator new and not previously declared reachable...
Change 27.11 [specialized.algorithms] paragraph 1 as follows:
...is required to have the property that no exceptions are thrown from increment, assignment, comparison, ordereference ofindirection through valid iterators...
Change 30.4.6.2.3 [locale.time.get.virtuals] paragraph 11 as follows:
Requires: t shallbe dereferenceablepoint to an object.
Change 24.4.4.2 [map.cons] paragraph 3 as follows:
Requires: If the iterator'sdereferenceindirection operator returns an lvalue or a const rvalue pair<key_type, mapped_type>, then both key_type and mapped_type shall be CopyConstructible.
Change 24.4.5.2 [multimap.cons] paragraph 3 as follows:
Requires: If the iterator'sdereferenceindirection operator returns an lvalue or a const rvalue pair<key_type, mapped_type>, then both key_type and mapped_type shall be CopyConstructible.
Change 24.4.6.2 [set.cons] paragraph 4 as follows:
Requires: If the iterator'sdereferenceindirection operator returns an lvalue or a non-const rvalue, then Key shall be CopyConstructible.
Change 24.4.7.2 [multiset.cons] paragraph 3 as follows:
Requires: If the iterator'sdereferenceindirection operator returns an lvalue or a const rvalue, then Key shall be CopyConstructible.
Change 25.5.4 [move.iterators] paragraph 1 as follows:
Class template move_iterator is an iterator adaptor with the same behavior as the underlying iterator except that itsdereferenceindirection operator implicitly converts the value returned by the underlying iterator'sdereferenceindirection operator to an rvalue reference...
Change the title of 32.11.1.4 [re.regiter.deref] as follows:
regex_iteratordereferenceindirection
Change the title of 32.11.2.4 [re.tokiter.deref] as follows:
regex_token_iteratordereferenceindirection