[Bug c++/29607] [DR 224] [4.1/4.2/4.3 Regression] dependent name with base classes
------- Comment #11 from mmitchel at gcc dot gnu dot org 2006-11-13 03:38 -------
I am going to put these DR 224 issues into WAITING. I don't think we really
know what the committee is going to do yet.
(Prior to that DR being put into the WP, I had a long discussion with John
Spicer. My feeling is that in:
template <typename T>
struct S {
...S...
}
S should be dependent. DR 224 says that it should not dependent.
My feeling is that dependence should be an intrinsic property of a type,
independent of context. John's feeling is that making its dependence
conditional makes things easier for programmers (although clearly harder for
compilers).
For example, in the test case in Comment #5, one can in fact prove that
WxVector::IterBase is the global class, independent of any specializations.
That is the argument it should not be dependent. However, in:
template <typename T>
struct S {
... sizeof(S) ...
}
the sizeof expression must be value-dependent, even though S is not
type-dependent, which is odd. (This case doesn't seem to be addressed by DR
224; AFAICT, DR 224 as written would make sizeof(S) non-dependent. Clearly,
that could be fixed by explicitly noting this case.) I find the fact that a
non-dependent type can have a dependent size to be weird.)
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29607
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
Reply to: