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


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

Re: explicit instantiation of methods bug.



	Andrew,

	I'm not sure about the state of egcs, but what you are doing could
easily be considered a partial specialization.  The SGI compiler, for instance,
would try to interpret your function as "Here's how I want to define A::f for
type double"

	Also, from the snippet of the standard you gave, what you are doing is
neither a member template definition, nor a member function definition.  You
should know that you can't declare a member function outside of the class
declaration so what does it fall into?

	I'm not sure where I stand on template instantiation.  According to
Stroustrup, the compiler should be smart enough to instantiate the proper
template code without operator intervention.  I consider it cheesy to insist
(like gcc 7.2 did, at least) that the user explicitly tell the compiler when he
planned to instantiate a template.

	I think a lot of compilers (SGI included) have a very hard time with
template dependencies, especially when the instantiation comes from a library
function call.

--
Mark Schaefer


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