octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ambiguous call to "pow(int, unsigned int&)" in __magick_read__.cc:763


From: Carlo de Falco
Subject: ambiguous call to "pow(int, unsigned int&)" in __magick_read__.cc:763
Date: Sat, 27 Aug 2011 11:38:20 +0200

Building the current tip on OSX 10.6 fails in DLD-FUNCTIONS/__magick_read__.cc
with the following error:

DLD-FUNCTIONS/__magick_read__.cc: In function 'void 
encode_uint_image(std::vector<Magick::Image, std::allocator<Magick::Image> >&, 
const octave_value&, bool)':
DLD-FUNCTIONS/__magick_read__.cc:763: error: call of overloaded 'pow(int, 
unsigned int&)' is ambiguous
/usr/include/architecture/i386/math.h:343: note: candidates are: double 
pow(double, double)
/usr/include/c++/4.2.1/cmath:373: note:                 long double 
std::pow(long double, int)
/usr/include/c++/4.2.1/cmath:369: note:                 float std::pow(float, 
int)
/usr/include/c++/4.2.1/cmath:365: note:                 double std::pow(double, 
int)
/usr/include/c++/4.2.1/cmath:361: note:                 long double 
std::pow(long double, long double)
/usr/include/c++/4.2.1/cmath:357: note:                 float std::pow(float, 
float)

I can fix the error by changing line 763 to

im.quantizeColors (static_cast<int> (pow (2, static_cast<double> (bitdepth))));

but it doesn't look very clean to me, what is this the correct fix?

c.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]