• Bug#266454: quantlib: FTBFS with gcc-3.4: 'this->' missing (7/7)

    From Andreas Jochens@1:229/2 to All on Wed Aug 18 00:50:05 2004
    [continued from previous message]

    boost::shared_ptr<MonteCarloModel<SingleAsset<RNG>, S> >(
    new MonteCarloModel<SingleAsset<RNG>, S>(
    - pathGenerator(), pathPricer(), S(),
    - antitheticVariate_));
    + pathGenerator(), this->pathPricer(), S(),
    + this->antitheticVariate_));
    }

    if (requiredTolerance_ != Null<Real>()) {
    if (maxSamples_ != Null<Size>())
    - value(requiredTolerance_, maxSamples_);
    + this->value(requiredTolerance_, maxSamples_);
    else
    - value(requiredTolerance_);
    + this->value(requiredTolerance_);
    } else {
    - valueWithSamples(requiredSamples_);
    + this->valueWithSamples(requiredSamples_);
    }

    - results_.value = mcModel_->sampleAccumulator().mean();
    + results_.value = this->mcModel_->sampleAccumulator().mean();
    if (RNG::allowsErrorEstimate)
    results_.errorEstimate =
    - mcModel_->sampleAccumulator().errorEstimate();
    + this->mcModel_->sampleAccumulator().errorEstimate();
    }

    }
    diff -urN ../tmp-orig/quantlib-0.3.7/ql/PricingEngines/genericmodelengine.hpp ./ql/PricingEngines/genericmodelengine.hpp
    --- ../tmp-orig/quantlib-0.3.7/ql/PricingEngines/genericmodelengine.hpp 2004-05-19 10:53:11.000000000 +0200
    +++ ./ql/PricingEngines/genericmodelengine.hpp 2004-08-17 21:53:38.708687329 +0200
    @@ -48,7 +48,7 @@
    update();
    }
    virtual void update() {
    - notifyObservers();
    + this->notifyObservers();
    }
    protected:
    boost::shared_ptr<ModelType> model_;
    diff -urN ../tmp-orig/quantlib-0.3.7/ql/PricingEngines/latticeshortratemodelengine.hpp ./ql/PricingEngines/latticeshortratemodelengine.hpp
    --- ../tmp-orig/quantlib-0.3.7/ql/PricingEngines/latticeshortratemodelengine.hpp 2004-03-25 17:52:28.000000000 +0100
    +++ ./ql/PricingEngines/latticeshortratemodelengine.hpp 2004-08-17 23:28:31.045320625 +0200
    @@ -62,15 +62,15 @@
    const TimeGrid& timeGrid)
    : GenericModelEngine<ShortRateModel, Arguments, Results>(model),
    timeGrid_(timeGrid), timeSteps_(0) {
    - lattice_ = model_->tree(timeGrid);
    + lattice_ =