[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ambiguous call to "pow(int, unsigned int&)" in __magick_read__.cc:76
From: |
Ben Abbott |
Subject: |
Re: ambiguous call to "pow(int, unsigned int&)" in __magick_read__.cc:763 |
Date: |
Sat, 27 Aug 2011 12:27:04 -0400 |
On Aug 27, 2011, at 5:38 AM, Carlo de Falco wrote:
> 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.
I'm running MacOS 10.7, and building with gcc-4.4, and GraphicsMagick 1.3.12.
I don't see this error.
With your suggested change, the sources also build without error.
I'm not competent in c/c++, but I don't see anything about your suggested
syntax that looks out of place.
Ben
- ambiguous call to "pow(int, unsigned int&)" in __magick_read__.cc:763, Carlo de Falco, 2011/08/27
- Re: ambiguous call to "pow(int, unsigned int&)" in __magick_read__.cc:763,
Ben Abbott <=
- Re: ambiguous call to "pow(int, unsigned int&)" in __magick_read__.cc:763, Jordi Gutiérrez Hermoso, 2011/08/27
- Re: ambiguous call to "pow(int, unsigned int&)" in __magick_read__.cc:763, Júlio Hoffimann, 2011/08/27
- Re: ambiguous call to "pow(int, unsigned int&)" in __magick_read__.cc:763, c., 2011/08/27
- Re: ambiguous call to "pow(int, unsigned int&)" in __magick_read__.cc:763, Júlio Hoffimann, 2011/08/27
- Re: ambiguous call to "pow(int, unsigned int&)" in __magick_read__.cc:763, Jordi Gutiérrez Hermoso, 2011/08/27
- Re: ambiguous call to "pow(int, unsigned int&)" in __magick_read__.cc:763, Júlio Hoffimann, 2011/08/27
- Re: ambiguous call to "pow(int, unsigned int&)" in __magick_read__.cc:763, Jussi Lehtola, 2011/08/27
- Re: ambiguous call to "pow(int, unsigned int&)" in __magick_read__.cc:763, c., 2011/08/28
- Re: ambiguous call to "pow(int, unsigned int&)" in __magick_read__.cc:763, Jordi Gutiérrez Hermoso, 2011/08/28
- Re: ambiguous call to "pow(int, unsigned int&)" in __magick_read__.cc:763, c., 2011/08/29