[vtk-developers] Which compilers to use "extern template" with

David Gobbi david.gobbi at gmail.com
Thu Sep 1 13:18:31 EDT 2016


Hi David,

You've been playing around with the "extern template" stuff for longer than
I have, so I'm wondering if you can share some experience.

It seems that restricting "extern template" to MSVC 2015 and up would
reduce or eliminate the need for "#pragma warning".  Would it be a bad
thing if we stopped using "extern template" with MSVC 2008, 2010, etc?  The
reason that I ask is that, as I expand the use of "extern template" to
other parts of VTK, I don't want to have to add "#pragma warning" every
time.

For clang and gcc, I was only planning to use "extern template" when
-std=c++11 because otherwise clang generates a warning about this being a
"c++11 feature".

On the other hand I could bite the bullet and also use "extern template"
for pre-c++11 builds, and insert pragmas into a whole bunch of source
files (probably 20 or so) to silence the warnings.

 - David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160901/3b6de934/attachment.html>


More information about the vtk-developers mailing list