RE: visual c++ upgrading problem

Posted by cuchulainn on
URL: http://quantlib.414.s1.nabble.com/visual-c-upgrading-problem-tp3536p3547.html

[Quantlib-users] visual c++ upgrading problem
Hi all,
I am working in VS 2005 beta and I have the following remarks. Lets take the class FDMDiector with 2 constructors:
 

FDMDirector

{ // Default constuctor

{m = Mesher();

}

FDMDirector (const Mesher& mesher)

{// Another constructor

m = mesher;

}

TEST PROGRAM IS NOW

int main()

{

using namespace BlackScholesOneFactorIBVP;

sigma = mySigma;

double d = (sigma)(1.0, 3.9);

cout << d << endl;

FDMDirector fdir;

Vector<double, int> c = fdir.current();

return 0;

}

NOW, here are some results:
 
1. If you create a default constructor everything is OK
2. If no default constructor but there is another one, then we get a compiler error
3. If there are no constructors then compiler generates one
 
This is exactlly my problem as wel from VC 6. I have not tested VS 2003 (7.1?)  but maybe it is same problem.
 
I notice that the code generates an anonymous object as a parameter. Maybe ...
 
Hope this helps,
 
Luca, if you have any probllems send me a mail.
 
Ciao e buona serata
 
Daniel

P.S. other nasty problems have to do with templteas and typedefs; some functions must be inline,eespac iterators in STL
 
 

From: [hidden email] on behalf of Luca Berardi
Sent: Mon 24/01/2005 16:13
To: [hidden email]
Subject: [Quantlib-users] visual c++ upgrading problem


Hi all

I've just upgraded from Visual C++ 6.0 to Visual C++ 7.1 (MS .Net).
When compiling my own code I could not overcome the problem described below:
The piece of code:

BoxMullerGaussianRng<MersenneTwisterUniformRng>
   generator( MersenneTwisterUniformRng() );
Z = generator.next().value;

generates the following error:

left of '.next' must have class/struct/union type
type is 'overloaded-function'

When compiling the same piece of code with Visual C++ 6.0 I didn't get any
errors, (and I can't see why the above code should produce an error, anyway).

Can someone please help me fix this problem?
Thanks in advance.

Luca Berardi


__________________________________________________________________
Tiscali Adsl 2 Mega Free, 2 Mega GRATIS!
Attiva Tiscali Adsl 2 Mega Free entro il 31 gennaio e navighi GRATIS
fino al 31 marzo 2005! In piu', anche il costo di adesione e' GRATIS.
Scaricato il concetto? http://abbonati.tiscali.it/adsl/





-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Quantlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users