bug in xibor..

Posted by Xavier.Abulker on
URL: http://quantlib.414.s1.nabble.com/bug-in-xibor-tp2199.html

Hello,
the example SwapValuation.cpp and all the zero curve generation don't work
on Unix Sun Solaris 2.8.
We found where the problem comes from and this is a fix proposal:

in dir: $QuatLib/ql/Indexes/xibormanager.cpp the variable
XiborManager::HistoryMap XiborManager::historyMap_; are never explicitely
initialized.

To solve this problem:
in xibormanager.cpp remove the row  // XiborManager::HistoryMap
XiborManager::historyMap_;
and replace
QL_REQUIRE(i != historyMap_.end(),
                name + " history not loaded");
by
if (i != historyMap_.end())
                throw Error(name + " history not loaded");

in xibormanager.hpp we add
#ifdef quantlib_global_define
     XiborManager::HistoryMap XiborManager::historyMap_ =
XiborManager::HistoryMap();
#endif

in xibor.cpp we add
# define  quantlib_global_define


enclosed to this email the files changed.
Could you please integrate this fix?
Thanks

Xavier

(See attached file: xibormanager.cpp)(See attached file: xibormanager.hpp)
(See attached file: xibor.cpp)


*************************************************************************
Ce message et toutes les pieces jointes (ci-apres le "message") sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration.
La Fimat et ses filiales declinent toute responsabilite au
titre de ce message s'il a ete altere, deforme ou falsifie.
                    ********
This message and any attachments (the "message") are confidential and
intended solely for the addressees.
Any unauthorised use or dissemination is prohibited.
E-mails are susceptible to alteration.
Neither Fimat nor any of its subsidiaries or affiliates shall
be liable for the message if altered, changed or falsified.
*************************************************************************

xibormanager.cpp (2K) Download Attachment
xibormanager.hpp (2K) Download Attachment
xibor.cpp (4K) Download Attachment