Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Hi,
I get the following compiling error in MS VC++ when trying to use KrondonIntegral class ( though it works with Borland C++). Could someone please give a hint? \quantlib\quantlib-0.3.4\ql\math\kronrodintegral.hpp(52) : fatal error C1001: INTERNAL COMPILER ERROR Thanks for your help,
Amar Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
I think the problem is due to the signature of the function I pass in the operator(). I had earlier used as following :
double Fn(double x)
{
return x^2;
} double val = KronrodIntegral(0.1,1000)(Fn,0,5);
This gave the above compiling error in MS VC++, while it works in Borland C++.
Writing it as
double val = KronrodIntegral(0.1,1000)(std::ptr_fun<double,double>(Fn),0,5);
solves the compiling error problem in MS VC++.
Don't know how it works though! (copied the usage from test-suite!)
Thanks all for your help,
Amar amar singh <[hidden email]> wrote:
... [show rest of quote] Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
On 2003.12.23 07:10, amar singh wrote:
> I think the problem is due to the signature of the function I pass in > the operator(). I had earlier used as following : > > double Fn(double x) > { > return x^2; > } > > double val = KronrodIntegral(0.1,1000)(Fn,0,5); > > This gave the above compiling error in MS VC++, while it works in > Borland C++. > > Writing it as > double val = KronrodIntegral(0.1,1000)(std::ptr_fun<double,double> > (Fn),0,5); > > solves the compiling error problem in MS VC++. > > Don't know how it works though! (copied the usage from test-suite!) ... [show rest of quote] Amar, the error you had wasn't an error in your code--it was an internal compiler error, meaning that VC++ got confused by something and could not even tell you why. In short, you triggered a bug in the compiler. The compiler documentation is not much help either--it merely suggests to rewrite your (legal) code in a different way. In short, they don't know why the compiler goes bang and hope that rewriting the code will cause the compiler to do something different. Sorry if I cannot be of much more help, Luigi |
Free forum by Nabble | Disable Popup Ads | Edit this page |