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: empty function optimizations


> > I personally believe that the right fix is in the compiler, which
> > should statically determine that instantiations don't depend on the
> > some template parameters, and mangle the function names with a
> > wildcard. 
> Rather, the function should only depend on sizeof(T), which would then be
> mangled into the name.

There are different cases. In some cases, the template functions are
independent from the template parameter, e.g. std::list::begin. What
template function are you thinking of that only depends on sizeof(T)?
I don't think there are so many of them in the STL.

Regards,
Martin

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