Re: partial specialization

Tech-Archive recommends: Fix windows errors by optimizing your registry



Igor Tandetnik wrote:

The reason is the same as for function
templates: member functions can be overloaded, and then there's no
way to uniquely specify which overload you are specializing: just a
function name is insufficient.

I'm not sure I know what you mean. I can see a problem with templated
methods - with non-template ones I cannot see a problem unique to
partial specialization. Maybe I'm missing something, can you sho an
example?

Besides, there's nothing wrong with compile error when ambiguity
arizes... :)

--

.



Relevant Pages

  • Re: trees example
    ... One of the problems related to templates and overloading is at what moment ... c.l.c++.m) is that instantiation only happens *after* one of the overloads ... for overload resolution that can not be validly instantiated. ... a.c.l.l.c-c++ FAQ mirror: http://nullptr.merseine.nu:8080/acllcc++.html ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Vacation
    ... have only 2 clients and I can usually get at least a few days, up to perhaps a week, but the overload when I get back makes me wonder if it is worth it. ... The docs never wanted to use the hospital transcription department because they wouldn't let them use templates at that time, and templates were a huge time saver. ...
    (sci.med.transcription)
  • Re: Problem with basic templates on GCC
    ... > member functions and no their definitions. ... > classes definions of all members must be visible ... nothing related to templates seems to be compiling correctly ...
    (comp.lang.cpp)
  • Re: template specialization
    ... >> Second, if you're dealing with a class heirarchy, why do you need to ... Can't you just overload the function? ... I use templates because I don't want to have to ... Item 41 says "Differentiate between inheritance and templates" -- the ...
    (comp.lang.cpp)
  • Re: Overloaded functions
    ... > void print; ... can overload it for te two types. ... is redundant repetition of the same information. ... Consider, also, the interaction of function overloading and templates. ...
    (comp.lang.cpp)