RE: visual c++ upgrading problem

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

Re: [Quantlib-users] visual c++ upgrading problem
Luigi,
I am using 2005 beta, so maybe it is difernet. All I know is that if you do NOT implement a default constructor my own code does not work.
 
I have experienced sttange things when moving to versions > 6.
 
regards
 
Daniel


From: Luigi Ballabio [mailto:[hidden email]]
Sent: Tue 25/01/2005 09:45
To: Daniel J. Duffy
Cc: QuantLib users
Subject: Re: [Quantlib-users] visual c++ upgrading problem

On 01/24/05 21:42:52, Daniel J. Duffy wrote:
> problem is in VS > 6.0 that you MUST define a default constructor. So if
> you
>
> generator(MersenneTwisterUniformRng() );
>
> compiler looks for DefCon and does not find it. I think that this was a
> problem too.

Daniel,
        this is strange, since MersenneTwister _does_ have a default 
constructor:

explicit MersenneTwisterUniformRng(unsigned long seed = 0);

Are you saying that in VS > 6, the following won't compile? May you try it?

----------------------------------------
#include <ql/quantlib.hpp>

using namespace QuantLib;

int main() {
        MersenneTwisterUniformRng twister;
        return 0;
}
----------------------------------------

Later,
        Luigi