Created on 2010-08-02.00:00:00 last changed 25 months ago
Note:
This issue was raised again at the March, 2011 meeting and paper N3276, implementing this recommendation, was adopted for the FDIS.
Rationale (November, 2010):
The CWG was persuaded by the SFINAE consideration.
Additional note (October, 2010):
Another potential consideration in this question is the use of the return type in template argument deduction. If the return type is a specialization of a class template, one would want an error occurring in the instantiation of that specialization to cause a deduction failure, which would argue in favor of requiring the type to be complete. (However, that might also be covered by “when the completeness of the class type affects the semantics of the program” in 13.9.2 [temp.inst] paragraph 1.)
decltype applied to a function call expression requires a complete type (7.6.1.3 [expr.call] paragraph 3 and 6.3 [basic.def.odr] paragraph 4), even though decltype's result might be used in a way that does not actually require a complete type. This might cause undesired and excessive template instantiations. Immediately applying decltype should not require a complete type, for example, for the return type of a function call.
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-11-20 07:54:16 | admin | set | messages: + msg7026 |
2010-11-29 00:00:00 | admin | set | messages: + msg3211 |
2010-11-29 00:00:00 | admin | set | status: open -> nad |
2010-10-18 00:00:00 | admin | set | messages: + msg3006 |
2010-08-02 00:00:00 | admin | create |