Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inner classes are implicitly friends since C++11 #1486

Merged
merged 1 commit into from Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions ql/cashflows/conundrumpricer.hpp
Expand Up @@ -149,8 +149,6 @@ namespace QuantLib {
Real der2Rs_derX2(Real x);
Real der2Z_derX2(Real x);

class ObjectiveFunction;
friend class ObjectiveFunction;
class ObjectiveFunction {
const GFunctionWithShifts& o_;
Real Rs_;
Expand Down
1 change: 0 additions & 1 deletion ql/cashflows/lineartsrpricer.hpp
Expand Up @@ -189,7 +189,6 @@ namespace QuantLib {
Real a_, b_;

class integrand_f;
friend class integrand_f;

class VegaRatioHelper {
public:
Expand Down
1 change: 0 additions & 1 deletion ql/experimental/coupons/lognormalcmsspreadpricer.hpp
Expand Up @@ -84,7 +84,6 @@ namespace QuantLib {
Real integrand_normal(Real) const;

class integrand_f;
friend class integrand_f;

ext::shared_ptr<CmsCouponPricer> cmsPricer_;

Expand Down
2 changes: 0 additions & 2 deletions ql/experimental/math/fireflyalgorithm.hpp
Expand Up @@ -81,8 +81,6 @@ namespace QuantLib {
public:
class RandomWalk;
class Intensity;
friend class RandomWalk;
friend class Intensity;
FireflyAlgorithm(Size M,
ext::shared_ptr<Intensity> intensity,
ext::shared_ptr<RandomWalk> randomWalk,
Expand Down
2 changes: 0 additions & 2 deletions ql/experimental/math/particleswarmoptimization.hpp
Expand Up @@ -93,8 +93,6 @@ namespace QuantLib {
public:
class Inertia;
class Topology;
friend class Inertia;
friend class Topology;
ParticleSwarmOptimization(Size M,
ext::shared_ptr<Topology> topology,
ext::shared_ptr<Inertia> inertia,
Expand Down
1 change: 0 additions & 1 deletion ql/experimental/swaptions/haganirregularswaptionengine.hpp
Expand Up @@ -91,7 +91,6 @@ namespace QuantLib {
Handle<YieldTermStructure> termStructure_;
Handle<SwaptionVolatilityStructure> volatilityStructure_;
class rStarFinder;
friend class rStarFinder;
};

}
Expand Down
2 changes: 0 additions & 2 deletions ql/experimental/volatility/noarbsabr.hpp
Expand Up @@ -130,9 +130,7 @@ class NoArbSabrModel {
mutable Real numericalForward_;
ext::shared_ptr<GaussLobattoIntegral> integrator_;
class integrand;
friend class integrand;
class p_integrand;
friend class p_integrand;
};

namespace detail {
Expand Down
1 change: 0 additions & 1 deletion ql/legacy/libormarketmodels/lfmcovarproxy.hpp
Expand Up @@ -53,7 +53,6 @@ namespace QuantLib {

private:
class Var_Helper;
friend class Var_Helper;
};

}
Expand Down
1 change: 0 additions & 1 deletion ql/models/model.hpp
Expand Up @@ -134,7 +134,6 @@ namespace QuantLib {
class PrivateConstraint;
//! Calibration cost function class
class CalibrationFunction;
friend class CalibrationFunction;
};

//! Abstract short-rate model class
Expand Down
2 changes: 0 additions & 2 deletions ql/models/shortrate/onefactormodels/markovfunctional.hpp
Expand Up @@ -477,8 +477,6 @@ namespace QuantLib {
bool zeroFixingDays = false,
const ext::shared_ptr<SwapIndex>& swapIdx = ext::shared_ptr<SwapIndex>()) const;

class ZeroHelper;
friend class ZeroHelper;
class ZeroHelper {
public:
ZeroHelper(const MarkovFunctional *model, const Date &expiry,
Expand Down
1 change: 0 additions & 1 deletion ql/models/shortrate/twofactormodels/g2.hpp
Expand Up @@ -113,7 +113,6 @@ namespace QuantLib {
Real V(Time t) const;

class SwaptionPricingFunction;
friend class SwaptionPricingFunction;
};

class G2::Dynamics : public TwoFactorModel::ShortRateDynamics {
Expand Down
1 change: 0 additions & 1 deletion ql/pricingengines/blackcalculator.hpp
Expand Up @@ -37,7 +37,6 @@ namespace QuantLib {
class BlackCalculator {
private:
class Calculator;
friend class Calculator;
public:
BlackCalculator(const ext::shared_ptr<StrikedTypePayoff>& payoff,
Real forward,
Expand Down
2 changes: 0 additions & 2 deletions ql/pricingengines/swaption/basketgeneratingengine.hpp
Expand Up @@ -98,8 +98,6 @@ namespace QuantLib {
const Handle<Quote> oas_;
const Handle<YieldTermStructure> discountCurve_;

class MatchHelper;
friend class MatchHelper;
class MatchHelper : public CostFunction {
public:
MatchHelper(const Swap::Type type,
Expand Down
Expand Up @@ -49,7 +49,6 @@ namespace QuantLib {

private:
class rStarFinder;
friend class rStarFinder;
};
}

Expand Down
1 change: 0 additions & 1 deletion ql/pricingengines/swaption/jamshidianswaptionengine.hpp
Expand Up @@ -61,7 +61,6 @@ namespace QuantLib {
private:
Handle<YieldTermStructure> termStructure_;
class rStarFinder;
friend class rStarFinder;
};

}
Expand Down
Expand Up @@ -67,8 +67,6 @@ class Gaussian1dSwaptionVolatility : public SwaptionVolatilityStructure {
ext::shared_ptr<Gaussian1dSwaptionEngine> engine_;
const Period maxSwapTenor_;

class DateHelper;
friend class DateHelper;
class DateHelper {
public:
DateHelper(const TermStructure &ts, const Time t) : ts_(ts), t_(t) {}
Expand Down
1 change: 0 additions & 1 deletion ql/termstructures/yield/fittedbonddiscountcurve.hpp
Expand Up @@ -81,7 +81,6 @@ namespace QuantLib {
public LazyObject {
public:
class FittingMethod;
friend class FittingMethod;

//! \name Constructors
//@{
Expand Down