[Insight-developers] template <>
Brad King
brad.king at kitware.com
Thu Apr 28 14:59:52 EDT 2005
Kent Williams 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 <>?
Some older HP and SGI compilers don't like it but I don't think we
support those anyway. One could also use the VCL_DEFINE_SPECIALIZATION
macro which is defined as template <> for compilers that support it and
empty otherwise.
-Brad
More information about the Insight-developers
mailing list