Bug#266454: quantlib: FTBFS with gcc-3.4: 'this->' missing (4/7)
From
Andreas Jochens@1:229/2 to
All on Wed Aug 18 00:50:05 2004
[continued from previous message]
"reset date later than settlement");
- QL_REQUIRE(exercise->lastDate() > resetDate,
+ QL_REQUIRE(this->exercise->lastDate() > resetDate,
"reset date later or equal to maturity");
}
@@ -95,15 +95,15 @@
const {
boost::shared_ptr<StrikedTypePayoff> argumentsPayoff =
- boost::dynamic_pointer_cast<StrikedTypePayoff>(arguments_.payoff); + boost::dynamic_pointer_cast<StrikedTypePayoff>(this->arguments_.payoff);
QL_REQUIRE(argumentsPayoff, "wrong payoff given");
const boost::shared_ptr<BlackScholesProcess>& process =
- arguments_.blackScholesProcess;
+ this->arguments_.blackScholesProcess;
boost::shared_ptr<StrikedTypePayoff> payoff(
new PlainVanillaPayoff(argumentsPayoff->optionType(),
- arguments_.moneyness *
+ this->arguments_.moneyness *
process->stateVariable()->value()));
originalArguments_->payoff = payoff;
@@ -115,14 +115,14 @@
boost::shared_ptr<TermStructure>(
new ImpliedTermStructure(
RelinkableHandle<TermStructure>(process->dividendYield()), - arguments_.resetDate,
- arguments_.resetDate)));
+ this->arguments_.resetDate,
+ this->arguments_.resetDate)));
RelinkableHandle<TermStructure> riskFreeRate(
boost::shared_ptr<TermStructure>(
new ImpliedTermStructure(
RelinkableHandle<TermStructure>(process->riskFreeRate()),
- arguments_.resetDate,
- arguments_.resetDate)));
+ this->arguments_.resetDate,
+ this->arguments_.resetDate)));
// The following approach is ok if the vol is at most
// time dependant. It is plain wrong if it is asset dependant.
// In the latter case the right solution would be stochastic
@@ -133,14 +133,14 @@
new ImpliedVolTermStructure(
RelinkableHandle<BlackVolTermStructure>(
process->blackVolatility()), - arguments_.resetDate)));
+ this->arguments_.resetDate)));
originalArguments_->blackScholesProcess =
boost::shared_ptr<BlackScholesProcess>(
new BlackScholesProcess(spot, dividendYield,
riskFreeRate, blackVolatility));
- originalArguments_->exercise = arguments_.exercise;
+ originalArguments_->exercise = this->arguments_.exercise;
originalArguments_->validate();
}
@@ -158,25 +158,25 @@
const {
const boost::shared_ptr<BlackScholesProcess>& process =
- arguments_.blackScholesProcess;
+ this->arguments_.blackScholesProcess;
Time resetTime = process->riskFreeRate()->dayCounter().yearFraction(
process->riskFreeRate()->referenceDate(), - arguments_.resetDate);
+ this->arguments_.resetDate);
DiscountFactor discQ = process->dividendYield()->discount(
- arguments_.resetDate); + this->arguments_.resetDate);
- results_.value = discQ * originalResults_->value;
+ this->results_.value = discQ * originalResults_->value;
// I need the strike derivative here ...
- results_.delta = discQ * (originalResults_->delta +
- arguments_.moneyness * originalResults_->strikeSensitivity); - results_.gamma = 0.0;
- results_.theta = process->dividendYield()->zeroYield(
- arguments_.resetDate) - * results_.value;
- results_.vega = discQ * originalResults_->vega;
- results_.rho = discQ * originalResults_->rho;
- results_.dividendRho = - resetTime * results_.value
+ this->results_.delta = discQ * (originalResults_->delta +
+ this->arguments_.moneyness * originalResults_->strikeSensitivity);
+ this->results_.gamma = 0.0;
+ this->results_.theta = process->dividendYield()->zeroYield(
+ this->arguments_.resetDate)
+ * this->results_.value;
+ this->results_.vega = discQ * originalResults_->vega;
+ this->results_.rho = discQ * originalResults_->rho;
+ this->results_.dividendRho = - resetTime * this->results_.value
+ discQ * originalResults_->dividendRho;
}
diff -urN ../tmp-orig/quantlib-0.3.7/ql/PricingEngines/Forward/forwardperformanceengine.hpp ./ql/PricingEngines/Forward/forwardperformanceengine.hpp
--- ../tmp-orig/quantlib-0.3.7/ql/PricingEngines/Forward/forwardperformanceengine.hpp 2004-05-13 16:53:49.000000000 +0200
+++ ./ql/PricingEngines/Forward/forwardperformanceengine.hpp 2004-08-18 00:06:48.855000457 +0200
@@ -52,8 +52,8 @@
void ForwardPerformanceEngine<ArgumentsType, ResultsType>::calculate()
const {
- setOriginalArguments();
- originalEngine_->calculate();
+ this->setOriginalArguments();
+ this->originalEngine_->calculate();
getOriginalResults();
}
@@ -62,27 +62,27 @@
getOriginalResults() const {
const boost::shared_ptr<BlackScholesProcess>& process =
- arguments_.blackScholesProcess;
+ this->arguments_.blackScholesProcess;
Time resetTime = process->riskFreeRate()->dayCounter().yearFraction(
process->riskFreeRate()->referenceDate(), - ar