[vtk-developers] Building VTK against llvm's libc++
Kyle Lutz
kyle.lutz at kitware.com
Mon Feb 25 15:46:55 EST 2013
On Mon, Feb 25, 2013 at 3:06 PM, Sean McBride <sean at rogue-research.com> wrote:
> Hi all,
>
> I've just tried building VTK against llvm's libc++ in C++11 mode:
> <http://libcxx.llvm.org>
>
> I fixed one small error, but another exists that I don't understand (I'm no C++ expert):
>
> VTK/Common/Core/vtkOStreamWrapper.cxx:60:1: error: invalid operands to binary expression ('ostream' (aka 'basic_ostream<char>') and 'ostream')
> VTKOSTREAM_OPERATOR(ostream&);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> VTK/Common/Core/vtkOStreamWrapper.cxx:26:18: note: expanded from macro 'VTKOSTREAM_OPERATOR'
> { this->ostr << a; return *this; }
> ~~~~~~~~~~ ^ ~
>
> Any of you C++ gurus understand this? :)
>
> (You can repro on Mac with recent OS X & Xcode with CMAKE_CXX_FLAGS = -std=c++11 -stdlib=libc++)
That's because there is no such function with the signature:
operator<<(ostream&, ostream&)
In fact, I'm not even sure what such a function would do. Commenting
out that line in vtkOStreamWrapper.h/cxx fixes the error.
What's more curious is why GCC with libstdc++ doesn't complain
(perhaps because it is never invoked?)
-kyle
More information about the vtk-developers
mailing list