Posted by
Mark joshi-2 on
Mar 03, 2009; 6:00am
URL: http://quantlib.414.s1.nabble.com/building-under-x64-tp12665p12672.html
OK i've committed a new version that works with x64.
I've added a preprocessor macro x64 to indicate that building is under x64.
I've removed the default value for the null template and added
specializations for array and IntervalPrice.
I've put the specializations for these in their header files rather
than in null.hpp since this makes more
sense from a levelization viewpoint (and I couldn't get it to compile
with them null.hpp.)
I've also added a specialization under x64 only for Size.
I'll look into dealing with the lexical_cast issue.
mark
2009/2/17 Bojan Nikolic <
[hidden email]>:
>
> Hi Mark,
>
> Mark joshi <
[hidden email]> writes:
>
>> Ok I tried inserting
>>
>> template <>
>> class Null<Size> {
>> public:
>> Null() {}
>> operator Size() const { return Size(QL_NULL_INTEGER); }
>> };
>>
>> into null.hpp and it didn't help.
>
> I guess you tried combining this with:
>
> //! template class providing a null value for a given type.
> template <class Type>
> class Null;
>
> to check no further compilation errors come up?
>
>> As far as i can tell, the template specialization did nothing.
>
> You should be able to just printing the Null value to check it is not
> zero, i.e., std::cout<< Null<Size>();
> c
> Without a Windows setup this is now all guess work, but :
>
> In termstructure.cpp:
>
>> namespace QuantLib {
>>
>> TermStructure::TermStructure(const DayCounter& dc)
>> : moving_(false),
>> updated_(true),
>> settlementDays_(Null<Size>()),
>> dayCounter_(dc) {}
>
> Here we try to convert Size to Natural as settlementDays_ is declared Natural
>
>> TermStructure::TermStructure(const Date& referenceDate,
>> const Calendar& cal,
>> const DayCounter& dc)
>> : moving_(false), calendar_(cal),
>> referenceDate_(referenceDate), updated_(true),
>> settlementDays_(Null<Natural>()),
>> dayCounter_(dc) {}
>
> Here we use Natural to assign to Natural
>
>>
>> // rest of file
>
> I would try replacing the first settlementDays_(Null<Size>()) with
> settlementDays_(Null<Natural>())
>
>
> Best,
> Bojan
>
> --
> Bojan Nikolic ||
http://www.bnikolic.co.uk>
--
Quant Job Interview Questions and Answers is now out: www.markjoshi.com
Assoc Prof Mark Joshi
Centre for Actuarial Studies
University of Melbourne
My website is www.markjoshi.com
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev