Posted by
Patrik Sundberg on
URL: http://quantlib.414.s1.nabble.com/bug-in-xibor-tp2199p2202.html
On Wed, Sep 25, 2002 at 10:23:29AM +0200, Luigi Ballabio wrote:
>
> Hi,
>
> At 09:42 AM 9/25/02 +0200,
[hidden email] wrote:
> >1) to avoid the crash I have to do the following change:
> >either
> >if (i != historyMap_.end())
> > throw Error(name + " history not loaded");
> >or
> >QL_REQUIRE(i == historyMap_.end(),
> > name + " history not loaded");
> >otherwise it doesn't work.
>
> But the above is reversing the logic of the test!
> i != historyMap_.end() means that the history was found---and that is what
> we're requiring. What happens if you use the original test? Do you get a
> segfault, or an exception?
>
>
> >2) I agree with your second guess theoretically but I've tried just to add
> >XiborManager::HistoryMap XiborManager::historyMap_ =
> > XiborManager::HistoryMap(); and either gcc or c++ doesn't accept that.
>
> Hmm. It looks like legal C++ to me. What does gcc say?
>
>
> >With my fix it works fine with EuropeanOption and Zero curve generation.
> >Do you think it could be intergrated in CVS?
>
> Yes, at the very least I can try and include it in an #ifdef block.
> Do you know if there are any #defines I can check in order to detect
> whether I'm on solaris?
isn't a test for compiler and compiler version more appropriate? such sure
exist for gcc, I can't remember them right now.
--
---------------------------------------------------------------------------.
Patrik Sundberg Address: Rydsvägen 100C, 584 31 Linköping, Sweden |
Email:
[hidden email] ||
[hidden email] |
Phone: +46 13 178567 || +46 707 602240 |
.---> Applied Physics and Electrical Engineering student |
|-----> Master of Science in Business Administration and Economics student |
|-------> UNIX/Programming consultant |
`--------------------------------------------------------------------------'