Incorrect C++ code in IM's header files
Posted: 2010-06-16T02:08:02-07:00
I'm trying to use ImageMagick++ with the new clang++ compiler.
On Fedora 13 this program:
Gives this error when compiled with clang++:
I filed this as a bug in Clang's bug tracker but their response was that the definition of mapImages is invalid C++. See here for the actual discussion.
I used the latest clang from SVN. As far as I can remember, earlier versions of clang worked just fine.
On Fedora 13 this program:
Code: Select all
#include<iostream>
#include<Magick++.h>
using namespace Magick;
int main(int argc, char **argv) {
std::cout << "It compiled." << std::endl;
return 0;
}
Code: Select all
In file included from imbug.cpp:2:
In file included from /usr/include/ImageMagick/Magick++.h:12:
/usr/include/ImageMagick/Magick++/STL.h:2220:18: error: no viable overloaded
'='
quantizeInfo = dither_ ? MagickCore::MagickTrue : MagickCore::MagickFalse;
~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from imbug.cpp:2:
In file included from /usr/include/ImageMagick/Magick++.h:9:
In file included from /usr/include/ImageMagick/Magick++/Include.h:47:
In file included from /usr/include/ImageMagick/magick/MagickCore.h:169:
In file included from /usr/include/ImageMagick/magick/deprecate.h:34:
/usr/include/ImageMagick/magick/quantize.h:35:16: note: candidate function (the
implicit copy assignment operator) not viable: no known conversion from
'MagickCore::MagickBooleanType' to 'MagickCore::_QuantizeInfo const' for 1st
argument
typedef struct _QuantizeInfo
I used the latest clang from SVN. As far as I can remember, earlier versions of clang worked just fine.