Forked from
VTK / VTK
40387 commits behind the upstream repository.
Brad King
authored
This will allow std::string to be used with vtkSet/Get macros. See discussion thread VTK coding conventions clarification http://www.vtk.org/pipermail/vtk-developers/2014-March/014867.html It is not possible to portably forward-declare std::string or the std::basic_string<> template, but we do not want to include <string>. Instead, use a template that happens to match std::basic_string<> and forwards to a private implementation (where <string> and <iostream> are available) by casting through an internal concrete type. Use std::char_traits<> and std::allocator<> declarations that we know vtkSystemIncludes.h brought in before including the vtkOStreamWrapper.h header. Add a new "TestOStreamWrapper" test case to cover use of the vtkOStreamWrapper with std::string in a translation unit that acts like wrapper-generated sources (define VTK_STREAMS_FWD_ONLY) where no <iostream> is included. Suggested-by:David C. Lonie <david.lonie@kitware.com> Change-Id: I5bf4803b0e4b1e7c899b061fdbd6f66f08cbc7d6