[vtkusers] vtkStdString vs vtkstd::string
Brad King
brad.king at kitware.com
Fri Jan 15 09:42:11 EST 2010
Bill Lorensen wrote:
> On Thu, Jan 14, 2010 at 3:30 PM, David Thompson <dcthomp at sandia.gov> wrote:
>> Since Berk just formally announced that MSVC{6, 7.0} and BCC 5.6 are no
>> longer supported (thanks, Kitware!), do we need vtkstd at all? I don't
>> remember what compilers had problems with the STL being the global namespace
>> instead of std::, but perhaps all of the supported compilers have it in
>> std:: now? If so, shouldn't we get rid of the namespace macros/aliasing
>> altogether?
> It's not a problem with those compilers. It might have been VS5.
IIRC it was some old UNIX compilers that didn't have STL in std.
I think it is safe to stop using "vtkstd::" and switch to "std::".
One caveat is that we've been using
#include <vtkstd/xyz>
to include stl header "xyz". The vtkstd headers are configured from
Utilities/vtkstd.h.in which wraps the headers to block warnings:
/* Avoid warnings in MSVC standard headers. */
#if defined(_MSC_VER)
# pragma warning (push, 1)
# pragma warning (disable: 4702)
# pragma warning (disable: 4786)
#endif
/* Include the real header. */
#include <xyz>
#if defined(_MSC_VER)
# pragma warning(pop)
#endif
If we switch to direct inclusion of <xyz> we will loose blocking
of warnings in MS's own headers.
-Brad
More information about the vtkusers
mailing list