[vtk-developers] vtkNew compile error

Jeff Baumes jeff.baumes at kitware.com
Mon Feb 1 09:36:40 EST 2010


On Mon, Feb 1, 2010 at 8:03 AM, Brad King <brad.king at kitware.com> wrote:
> Bill Lorensen wrote:
>> If I include another vtk file first, everything is fine. I though that
>> vtkNew.h might need <ostream> but that didn't fix it.
>
> Since the streaming operator uses 'ostream' and not 'std::ostream' it
> is not enough to just include <ostream>.  Add
>
>  #include "vtkIOStream.h"
>
> to the header.  It does the "using std::ostream" for us.
>
> Alternatively we could consider starting to use "std::" for streams
> in our API.
>
>> That said, my first couple of experiments with vtkNew() are very
>> encouraging. The code is much lighter and readable.

Just as a +1, also had the compile error, also loving vtkNew.

Jeff



More information about the vtk-developers mailing list