This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: More test results...


Benjamin Kosnik wrote:
> 
> > Why I thought that would make any difference?  Because, my mental
> > model of export is that it inhibits multiple definitions.
> > Now I realize that explicit specialization is much more than "just
> > provide alternate definition" for a generic thingy.
> >
> > Now, you have provided more than convincing arguments about your worries.
> 
> Agreed. I think Martin's example is pretty compelling, actually.

FWIW, I subsequently found out that the example doesn't compile with
gcc 3.0.4 or EDG eccp 3.0, so I talked to John Spicer about it. He
thinks it's ill-formed and that static const integral members
initialized in the body of their parent class [template] are not (and
should not) be allowed to be explicitly specialized. John points to
9.4.2, p4 which in his opinion disallows it (I can't say I read it that
way).

I also tried the same code with HP aCC, IBM VisualAge and SunPro, all
of which accept it. The first two, however, fail to use either the
specialized value or the value in the primary template, so they
probably work only by accident. Sun in the meantime acknowledged that
the fact that the test case compiles is a bug and plan to diagnose it
in the future (they fail to emit the symbol for the member of the
primary template in a slightly more complicated test case and fail
to link as a result).

Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]