RE: visual c++ upgrading problem

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

Re: [Quantlib-users] visual c++ upgrading problem
Hi Luca, Luigi,
 
> C++ most vexing parse :)
I am not aware of this problem. 'vexing' is annoying, yes? I do not seem to have met this problem before but I might yet in the future if I am lucky:)
 
Maybe theres is some standard workaround?
 
Ciao
 
Daniel
 



From: Luca Berardi [mailto:[hidden email]]
Sent: Mon 24/01/2005 17:50
To: [hidden email]; Daniel J. Duffy; [hidden email]
Subject: Re: [Quantlib-users] visual c++ upgrading problem



;; If you want to create a file, first visit that file with C-x C-f,
;; then enter the text in that file's own buffer.



Luigi, Daniel

thank you very much for your help. Indeed I was not aware of the
infamous "C++ most vexing parse" :)
Now, following Luigi's suggestion, it works correctly.

Regarding Daniel's issue:

>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

Indeed I noticed the same behavior when playing with my code, trying
to get around the problem related to the vexing parse. But I guess it
is again related to the issue of the c++ most vexing parse. 
suppose I write:

      BoxMullerGaussianRng<MersenneTwisterUniformRng>
        generator(MersenneTwisterUniformRng() );
      Sample<Real> currentSample = generator.next();

The compiler signals an additional error saying that there is no
appropriate default constructor. Indeed if you add a default
constructor in the Sample<> class this last error disappears,
but the preceding one ("error C2228: left of '.next' must have
class/struct/union type") still remains.

I don't know the hidden reason behind this behavior; unfortunately I'm
not a C++ guru, otherwise I should have known of the C++ most vexing
parse :)

Ciao, grazie
Luca




__________________________________________________________________
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/