[ADOL-C-tickets] [A Package for Automatic Differentiation of Algorithms Written in C/C++] #8: call of overloaded 'fmax(double&, double&)' is ambiguous
A Package for Automatic Differentiation of Algorithms Written in C/C++
coin-trac at coin-or.org
Wed Sep 29 03:18:26 EDT 2010
#8: call of overloaded 'fmax(double&, double&)' is ambiguous
-------------------+--------------------------------------------------------
Reporter: lorenz | Owner: awalther
Type: defect | Status: new
Priority: major | Component: libadolc
Version: | Keywords:
-------------------+--------------------------------------------------------
When trying to compile this simple test file, the compiler stops with an
"ambiguous call" error for fmax and fmin. The problem would probably occur
with other overloaded functions too.
Source file:
{{{
#include <adolc/adolc.h>
int main(int, char **)
{
double x = 3, y = 4;
fmax(x, y);
fmin(x, y);
return 0;
}
}}}
Compiler call:
{{{
$ gcc -I../ADOL-C/include -L../ADOL-C/lib -ladolc fmax_test.cpp
}}}
Error messages:
{{{
fmax_test.cpp: In function 'int main(int, char**)':
fmax_test.cpp:7: error: call of overloaded 'fmax(double&, double&)' is
ambiguous
../ADOL-C/include/adolc/adouble.h:72: note: candidates are: double
fmax(const double&, const double&)
/usr/include/bits/mathcalls.h:339: note: double
fmax(double, double)
fmax_test.cpp:8: error: call of overloaded 'fmin(double&, double&)' is
ambiguous
../ADOL-C/include/adolc/adouble.h:71: note: candidates are: double
fmin(const double&, const double&)
/usr/include/bits/mathcalls.h:342: note: double
fmin(double, double)
}}}
System:
* gcc 4.4.3
* ADOL-C 2.1.10
--
Ticket URL: <https://projects.coin-or.org/ADOL-C/ticket/8>
A Package for Automatic Differentiation of Algorithms Written in C/C++ <https://projects.coin-or.org/ADOL-C>
A Package for Automatic Differentiation of Algorithms Written in C/C++
More information about the ADOL-C-tickets
mailing list