[vtk-developers] vtkNew compile error

Bill Lorensen bill.lorensen at gmail.com
Mon Feb 1 10:40:30 EST 2010


I think vtkNew would be a good spot to use std::ostream.

On Mon, Feb 1, 2010 at 9:36 AM, Jeff Baumes <jeff.baumes at kitware.com> wrote:
> 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