Re: templates and managed code

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Nishant Sivakumar wrote:
>> Beware that managed generics are *NOT* templates, although the
>> (unfortunately IMHO) share most of their syntax. Mainly, generics do
>> not support specialization (partial or total), nor dependent types
>> definition/inference. On the other side, generics use a mechanism to
>> restrict what instanciations are authorized for a given "template".
>
> I wasn't talking about generics - I was talking about managed
> templates which support specialization, derivation from the template
> parameter type etc.

I know, but I was not sure that Peter Oliphant was aware of the difference.

Arnaud
MVP - VC


.



Relevant Pages

  • Re: templates and managed code
    ... but I was not sure that Peter Oliphant was aware of the ... >>> not support specialization, nor dependent types ... >> templates which support specialization, ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Java vs C++, A Newbies perspective.
    ... That's what Java Generics do. ... is to write templates for code, which are expanded to different code ... Every pure type constraint on code using C++ templates is ...
    (comp.lang.java.programmer)
  • Re: Performance bei Vergleichoperationen
    ... C++ Templates eben mit den Generics nicht mithalten können, ... Templates sind IMHO bei Definiton das mächtigere Tool, ... zum Beispiel Laufzeit-Fehler ergeben - was C# in diesen Szenarien ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: C# generic containers from a "C++ perspective"
    ... templates can solve but generics do not. ... The single-threaded symbolic optimizer from FFTW would currently be ... The error reporting from generics is much better than templates. ... Or do you want to cast the ints to floats? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: C# generic containers from a "C++ perspective"
    ... My point is that .NET languages ... already have better ways to solve that problem, independently of generics. ... The error reporting from generics is much better than templates. ... even wrote dozens of painstakingly hand-optimized routines and chose ...
    (microsoft.public.dotnet.languages.csharp)