|
From: Bojan N. <bo...@bn...> - 2009-02-17 08:30:53
|
Hi Mark,
Mark joshi <mar...@gm...> 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
|