[Insight-users] Re: [Insight-developers] template <>

Ashish Poddar ahpoddar at gmail.com
Fri Apr 29 02:10:27 EDT 2005


the error may be linked with something in your code where you are using that 
templatized class..

as an example if u have 

template <class T>
void myfun(T);

and when calling this function u use

myfun<int>(4); // this is explicit specialization of the template parameter
myfun(4); // this is implicit specialization of the template parameter

so this warning must be linked with some similar code...

HTH,
with regards,
Ashish.

On 4/28/05, Kent Williams <norman-k-williams at uiowa.edu> wrote:
> 
> I noticed a warning when I used gcc -pedantic to compile some code that
> uses ITK. There were a bunch of warnings from gcc:
> 
> warning: explicit specialization not preceded by `template <>'
> 
> This goes back to itkMetaDataObject.h, and the NATIVE_TYPE_METADATAPRINT
> macro.
> That macro is used to define template specializations. I don't believe
> its widely used, and you never see a warning if you don't use -pedantic.
> At the same time, the only reason I could see for adding template <> to
> the template specializations is if there are compilers supported by ITK
> that would choke on that syntax.
> 
> So, does anyone know of compilers that wouldn't like template <>?
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
> 



-- 
Ashish Poddar
Have an acceptable reason for accepting anything.
Y:ashish_poddar | MSN:ashish_poddar at yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050429/28d13c23/attachment-0001.html


More information about the Insight-users mailing list