Home

>
>
> > Hi!
>
> > Ondra Holub schrieb:
>
> > > AFAIK partial specialization of functions is considered in prepared
> > > standard, but I am not sure.
>
> > No. The following already works (not with MSVC prior to 7.1, though):
>
> > //generic
> > template<typename T>
> > void process(T t) {}
>
> > //partial specialization
> > template<typename T>
> > void process(T* const t) {}
>
> > //full specialization
> > template<>
> > void process(void* const t) { throw "what is it?"; }
>
> > int main()
> > {
> > int i = 8;
> > process(i);
> > process(&i);
> > process( static_cast<void*>(&i) );
>
> > }
>
> > Frank
>
> Yes. it works. But it is full specialization, not partial
> specialization. Try following:
>

No it's just a overloaded template function.the last one is a full
specialization though

previous
next

Re: Order of statements using if
Re: Mysql class works like php
Re: status of Programming by Contract (PEP 316)?
Re: Script to extract text from PDF files
Re: OT: pronounciation [was: list index()]
łozka do sypialni
Nokia 2323
materace promocja
Hotele Poznań
historia bliski wschód