Created on 1998-10-13.00:00:00 last changed 196 months ago
[Moved to DR at October 2002 meeting.]
[Moved to DR at October 2002 meeting.]
A template is implicitly instantiated because of a "pointer conversion" on an argument. This was intended to include related-class conversions, but it also inadvertently includes conversions to void*, null pointer conversions, cv-qualification conversions and the identity conversion.
It is not clear whether a reinterpret_cast of a pointer should cause implicit instantiation.
Proposed resolution (10/01): Replace 13.9.2 [temp.inst] paragraph 4, up to the example, with the following:
A class template specialization is implicitly instantiated if the class type is used in a context that requires a completely-defined object type or if the completeness of the class type might affect the semantics of the program. [Note: in particular, if the semantics of an expression depend on the member or base class lists of a class template specialization, the class template specialization is implicitly generated. For instance, deleting a pointer to class type depends on whether or not the class declares a destructor, and conversion between pointer to class types depends on the inheritance relationship between the two classes involved. ]
This version differs from the previous version is its use of the word "might" in the first sentence.
(See also issue 212.)
History | |||
---|---|---|---|
Date | User | Action | Args |
2008-10-05 00:00:00 | admin | set | status: wp -> cd1 |
2003-04-25 00:00:00 | admin | set | status: dr -> wp |
2002-11-08 00:00:00 | admin | set | messages: + msg781 |
2002-11-08 00:00:00 | admin | set | status: ready -> dr |
2002-05-10 00:00:00 | admin | set | status: review -> ready |
2001-11-09 00:00:00 | admin | set | status: open -> review |
2000-05-21 00:00:00 | admin | set | status: review -> open |
2000-02-23 00:00:00 | admin | set | messages: + msg232 |
2000-02-23 00:00:00 | admin | set | status: open -> review |
1998-10-13 00:00:00 | admin | create |