Re: IndexedCouponVector function

Posted by Nicolas Di Césaré on
URL: http://quantlib.414.s1.nabble.com/IndexedCouponVector-function-tp3134p3135.html

Selon [hidden email]:

> Hi all.
> We got some problem in using the function IndexedCouponVector.
> This function uses a template (we can use UpFrontIndexedCoupon
> and InArrearCoupon to contruct the cashFlows).
> But independently of our choice, the function always instantiates
> the InArrearCoupon.
> Is there a reason for that? Should we use some specific project settings?
> Thanks to all.
> Enrico
>

Hi Enrico,

You are probably using VC++ 6 and it is a well known bug with template function.
There is a dirty solution : add a defaulted argument to the function with the
type of the template argument. If T is your template, add the argument

const T * visual_bug = 0

to the function.

Nicolas

PS: I will correct that tonight in the CVS tree.


--
Nicolas Di Césaré
http://nicolas.dicesare.free.fr