Hi guys,
Why have all curves recently been derived from
boost::noncopyable?
I’ve been copying yieldcurves (in external code) –
and it has been working perfectly if you implement a copy constructor for the PiecewiseYieldcurve
class that initializes the bootstrapper for the current curve (in the code I
submitted – shown below). Surely this makes more sense than completely
disabling copying?
//copy constructor
PiecewiseYieldCurve(const
this_curve& o)
: base_curve(o), instruments_(o.instruments_),
turnOfYearEffect_(o.turnOfYearEffect_),
accuracy_(o.accuracy_), latestReference_(o.latestReference_),
turnOfYear_(o.turnOfYear_),
bootstrap_(o.bootstrap_) {
setTurnOfYear();
registerWith(turnOfYearEffect_);
bootstrap_.setup(this);
}
Simon Ibbotson
Quantitative Analytics
Capital Markets
Straumur
| Free forum by Nabble | Edit this page |