Skip to content

Commit

Permalink
Avoid compiler errors with VC++13 and VC++15.
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Apr 3, 2021
1 parent 60f15c5 commit 81d0f5b
Show file tree
Hide file tree
Showing 45 changed files with 27 additions and 150 deletions.
2 changes: 0 additions & 2 deletions QuantLib.vcxproj
Expand Up @@ -2428,7 +2428,6 @@
<ClCompile Include="ql\models\marketmodels\evolvers\lognormalfwdrateiballand.cpp" />
<ClCompile Include="ql\models\marketmodels\evolvers\lognormalfwdrateipc.cpp" />
<ClCompile Include="ql\models\marketmodels\evolvers\lognormalfwdratepc.cpp" />
<ClCompile Include="ql\models\marketmodels\evolvers\marketmodelvolprocess.cpp" />
<ClCompile Include="ql\models\marketmodels\evolvers\normalfwdratepc.cpp" />
<ClCompile Include="ql\models\marketmodels\evolvers\svddfwdratepc.cpp" />
<ClCompile Include="ql\models\marketmodels\evolvers\volprocesses\squarerootandersen.cpp" />
Expand All @@ -2451,7 +2450,6 @@
<ClCompile Include="ql\models\marketmodels\models\piecewiseconstantabcdvariance.cpp" />
<ClCompile Include="ql\models\marketmodels\models\piecewiseconstantvariance.cpp" />
<ClCompile Include="ql\models\marketmodels\models\pseudorootfacade.cpp" />
<ClCompile Include="ql\models\marketmodels\models\volatilityinterpolationspecifier.cpp" />
<ClCompile Include="ql\models\marketmodels\models\volatilityinterpolationspecifierabcd.cpp" />
<ClCompile Include="ql\models\marketmodels\pathwiseaccountingengine.cpp" />
<ClCompile Include="ql\models\marketmodels\pathwisediscounter.cpp" />
Expand Down
6 changes: 0 additions & 6 deletions QuantLib.vcxproj.filters
Expand Up @@ -5044,9 +5044,6 @@
<ClCompile Include="ql\models\marketmodels\evolvers\lognormalfwdratepc.cpp">
<Filter>models\marketmodels\evolvers</Filter>
</ClCompile>
<ClCompile Include="ql\models\marketmodels\evolvers\marketmodelvolprocess.cpp">
<Filter>models\marketmodels\evolvers</Filter>
</ClCompile>
<ClCompile Include="ql\models\marketmodels\evolvers\normalfwdratepc.cpp">
<Filter>models\marketmodels\evolvers</Filter>
</ClCompile>
Expand Down Expand Up @@ -5101,9 +5098,6 @@
<ClCompile Include="ql\models\marketmodels\models\pseudorootfacade.cpp">
<Filter>models\marketmodels\models</Filter>
</ClCompile>
<ClCompile Include="ql\models\marketmodels\models\volatilityinterpolationspecifier.cpp">
<Filter>models\marketmodels\models</Filter>
</ClCompile>
<ClCompile Include="ql\models\marketmodels\models\volatilityinterpolationspecifierabcd.cpp">
<Filter>models\marketmodels\models</Filter>
</ClCompile>
Expand Down
2 changes: 0 additions & 2 deletions ql/CMakeLists.txt
Expand Up @@ -565,7 +565,6 @@ set(QuantLib_SRC
models/marketmodels/evolvers/lognormalfwdrateiballand.cpp
models/marketmodels/evolvers/lognormalfwdrateipc.cpp
models/marketmodels/evolvers/lognormalfwdratepc.cpp
models/marketmodels/evolvers/marketmodelvolprocess.cpp
models/marketmodels/evolvers/normalfwdratepc.cpp
models/marketmodels/evolvers/svddfwdratepc.cpp
models/marketmodels/evolvers/volprocesses/squarerootandersen.cpp
Expand All @@ -588,7 +587,6 @@ set(QuantLib_SRC
models/marketmodels/models/piecewiseconstantabcdvariance.cpp
models/marketmodels/models/piecewiseconstantvariance.cpp
models/marketmodels/models/pseudorootfacade.cpp
models/marketmodels/models/volatilityinterpolationspecifier.cpp
models/marketmodels/models/volatilityinterpolationspecifierabcd.cpp
models/marketmodels/pathwiseaccountingengine.cpp
models/marketmodels/pathwisediscounter.cpp
Expand Down
2 changes: 0 additions & 2 deletions ql/cashflows/cpicouponpricer.cpp
Expand Up @@ -22,8 +22,6 @@

namespace QuantLib {

CPICouponPricer::CPICouponPricer() = default;

CPICouponPricer::CPICouponPricer(Handle<YieldTermStructure> nominalTermStructure)
: nominalTermStructure_(std::move(nominalTermStructure)) {
registerWith(nominalTermStructure_);
Expand Down
2 changes: 1 addition & 1 deletion ql/cashflows/cpicouponpricer.hpp
Expand Up @@ -42,7 +42,7 @@ namespace QuantLib {
Deprecated in version 1.19.
*/
QL_DEPRECATED
CPICouponPricer();
CPICouponPricer() = default;

explicit CPICouponPricer(Handle<YieldTermStructure> nominalTermStructure);

Expand Down
2 changes: 0 additions & 2 deletions ql/cashflows/inflationcouponpricer.cpp
Expand Up @@ -34,8 +34,6 @@ namespace QuantLib {
}


YoYInflationCouponPricer::YoYInflationCouponPricer() = default;

YoYInflationCouponPricer::YoYInflationCouponPricer(
Handle<YieldTermStructure> nominalTermStructure)
: nominalTermStructure_(std::move(nominalTermStructure)) {
Expand Down
2 changes: 1 addition & 1 deletion ql/cashflows/inflationcouponpricer.hpp
Expand Up @@ -89,7 +89,7 @@ namespace QuantLib {
Deprecated in version 1.19.
*/
QL_DEPRECATED
YoYInflationCouponPricer();
YoYInflationCouponPricer() = default;

explicit YoYInflationCouponPricer(Handle<YieldTermStructure> nominalTermStructure);

Expand Down
4 changes: 1 addition & 3 deletions ql/currency.hpp
Expand Up @@ -40,7 +40,7 @@ namespace QuantLib {
and must be reassigned to a valid currency before being
used.
*/
Currency();
Currency() = default;
//! \name Inspectors
//@{
//! currency name, e.g, "U.S. Dollar"
Expand Down Expand Up @@ -112,8 +112,6 @@ namespace QuantLib {

// inline definitions

inline Currency::Currency() = default;

inline void Currency::checkNonEmpty() const {
QL_REQUIRE(data_, "no currency data provided");
}
Expand Down
3 changes: 0 additions & 3 deletions ql/experimental/commodities/energycommodity.cpp
Expand Up @@ -26,9 +26,6 @@

namespace QuantLib {


EnergyDailyPosition::EnergyDailyPosition() = default;

EnergyDailyPosition::EnergyDailyPosition(const Date& date,
Real payLegPrice,
Real receiveLegPrice,
Expand Down
2 changes: 1 addition & 1 deletion ql/experimental/commodities/energycommodity.hpp
Expand Up @@ -42,7 +42,7 @@ namespace QuantLib {
Real riskDelta;
bool unrealized = false;

EnergyDailyPosition();
EnergyDailyPosition() = default;
EnergyDailyPosition(const Date& date,
Real payLegPrice,
Real receiveLegPrice,
Expand Down
4 changes: 1 addition & 3 deletions ql/experimental/commodities/exchangecontract.hpp
Expand Up @@ -32,7 +32,7 @@ namespace QuantLib {

class ExchangeContract {
public:
ExchangeContract();
ExchangeContract() = default;
ExchangeContract(std::string code,
Date expirationDate,
Date underlyingStartDate,
Expand All @@ -49,8 +49,6 @@ namespace QuantLib {
Date underlyingEndDate_;
};

inline ExchangeContract::ExchangeContract() = default;

inline ExchangeContract::ExchangeContract(std::string code,
Date expirationDate,
Date underlyingStartDate,
Expand Down
4 changes: 1 addition & 3 deletions ql/experimental/commodities/paymentterm.hpp
Expand Up @@ -34,7 +34,7 @@ namespace QuantLib {
public:
enum EventType { TradeDate, PricingDate };

PaymentTerm();
PaymentTerm() = default;
PaymentTerm(const std::string& name,
EventType eventType,
Integer offsetDays,
Expand Down Expand Up @@ -86,8 +86,6 @@ namespace QuantLib {
: name(std::move(name)), eventType(eventType), offsetDays(offsetDays),
calendar(std::move(calendar)) {}

inline PaymentTerm::PaymentTerm() = default;

inline const std::string& PaymentTerm::name() const {
return data_->name;
}
Expand Down
4 changes: 1 addition & 3 deletions ql/experimental/commodities/quantity.hpp
Expand Up @@ -35,7 +35,7 @@ namespace QuantLib {
public:
//! \name Constructors
//@{
Quantity();
Quantity() = default;
Quantity(CommodityType commodityType, UnitOfMeasure unitOfMeasure, Real amount);
//@}
//! \name Inspectors
Expand Down Expand Up @@ -121,8 +121,6 @@ namespace QuantLib {

// inline definitions

inline Quantity::Quantity() = default;

inline Quantity::Quantity(CommodityType commodityType, UnitOfMeasure unitOfMeasure, Real amount)
: commodityType_(std::move(commodityType)), unitOfMeasure_(std::move(unitOfMeasure)),
amount_(amount) {}
Expand Down
4 changes: 1 addition & 3 deletions ql/experimental/commodities/unitofmeasure.hpp
Expand Up @@ -43,7 +43,7 @@ namespace QuantLib {
and must be reassigned to a valid currency before being
used.
*/
UnitOfMeasure();
UnitOfMeasure() = default;
UnitOfMeasure(const std::string& name,
const std::string& code,
Type unitType);
Expand Down Expand Up @@ -102,8 +102,6 @@ namespace QuantLib {

// inline definitions

inline UnitOfMeasure::UnitOfMeasure() = default;

inline const std::string& UnitOfMeasure::name() const {
return data_->name;
}
Expand Down
4 changes: 1 addition & 3 deletions ql/experimental/commodities/unitofmeasureconversion.hpp
Expand Up @@ -40,7 +40,7 @@ namespace QuantLib {
};
//! \name Constructors
//@{
UnitOfMeasureConversion();
UnitOfMeasureConversion() = default;
/*! the conversionFactor \f$ r \f$ is given with the
convention that a unit of the source is worth \f$ r \f$
units of the target.
Expand Down Expand Up @@ -105,8 +105,6 @@ namespace QuantLib {

// inline definitions

inline UnitOfMeasureConversion::UnitOfMeasureConversion() = default;

inline const CommodityType& UnitOfMeasureConversion::commodityType() const {
return data_->commodityType;
}
Expand Down
2 changes: 0 additions & 2 deletions ql/experimental/exoticoptions/himalayaoption.cpp
Expand Up @@ -40,8 +40,6 @@ namespace QuantLib {
arguments->fixingDates = fixingDates_;
}

HimalayaOption::arguments::arguments() = default;

void HimalayaOption::arguments::validate() const {
MultiAssetOption::arguments::validate();
QL_REQUIRE(!fixingDates.empty(), "no fixing dates given");
Expand Down
1 change: 0 additions & 1 deletion ql/experimental/exoticoptions/himalayaoption.hpp
Expand Up @@ -57,7 +57,6 @@ namespace QuantLib {

class HimalayaOption::arguments : public MultiAssetOption::arguments {
public:
arguments();
void validate() const override;
std::vector<Date> fixingDates;
};
Expand Down
2 changes: 0 additions & 2 deletions ql/methods/finitedifferences/bsmoperator.cpp
Expand Up @@ -24,8 +24,6 @@

namespace QuantLib {

BSMOperator::BSMOperator() = default;

BSMOperator::BSMOperator(Size size, Real dx, Rate r,
Rate q, Volatility sigma)
: TridiagonalOperator(size) {
Expand Down
2 changes: 1 addition & 1 deletion ql/methods/finitedifferences/bsmoperator.hpp
Expand Up @@ -34,7 +34,7 @@ namespace QuantLib {
/*! \ingroup findiff */
class BSMOperator : public TridiagonalOperator {
public:
BSMOperator();
BSMOperator() = default;
BSMOperator(Size size, Real dx, Rate r, Rate q, Volatility sigma);
BSMOperator(const Array& grid, Rate r, Rate q, Volatility sigma);
};
Expand Down
2 changes: 0 additions & 2 deletions ql/models/marketmodels/evolutiondescription.cpp
Expand Up @@ -28,8 +28,6 @@

namespace QuantLib {

EvolutionDescription::EvolutionDescription() = default;

EvolutionDescription::EvolutionDescription(
const std::vector<Time>& rateTimes,
const std::vector<Time>& evolutionTimes,
Expand Down
2 changes: 1 addition & 1 deletion ql/models/marketmodels/evolutiondescription.hpp
Expand Up @@ -57,7 +57,7 @@ namespace QuantLib {
// default argument worked)
typedef std::pair<Size,Size> range;
public:
EvolutionDescription();
EvolutionDescription() = default;
explicit EvolutionDescription(
const std::vector<Time>& rateTimes,
const std::vector<Time>& evolutionTimes = std::vector<Time>(),
Expand Down
1 change: 0 additions & 1 deletion ql/models/marketmodels/evolvers/Makefile.am
Expand Up @@ -26,7 +26,6 @@ cpp_files = \
lognormalfwdrateiballand.cpp \
lognormalfwdrateipc.cpp \
lognormalfwdratepc.cpp \
marketmodelvolprocess.cpp \
normalfwdratepc.cpp \
svddfwdratepc.cpp

Expand Down
28 changes: 0 additions & 28 deletions ql/models/marketmodels/evolvers/marketmodelvolprocess.cpp

This file was deleted.

4 changes: 2 additions & 2 deletions ql/models/marketmodels/evolvers/marketmodelvolprocess.hpp
Expand Up @@ -34,8 +34,8 @@ namespace QuantLib
class MarketModelVolProcess
{
public:
MarketModelVolProcess();
virtual ~MarketModelVolProcess();
MarketModelVolProcess() = default;
virtual ~MarketModelVolProcess() = default;

virtual Size variatesPerStep()=0;
virtual Size numberSteps()=0;
Expand Down
1 change: 0 additions & 1 deletion ql/models/marketmodels/models/Makefile.am
Expand Up @@ -40,7 +40,6 @@ cpp_files = \
piecewiseconstantabcdvariance.cpp \
piecewiseconstantvariance.cpp \
pseudorootfacade.cpp \
volatilityinterpolationspecifier.cpp \
volatilityinterpolationspecifierabcd.cpp

if UNITY_BUILD
Expand Down
2 changes: 0 additions & 2 deletions ql/models/marketmodels/models/ctsmmcapletcalibration.cpp
Expand Up @@ -31,8 +31,6 @@

namespace QuantLib {

CTSMMCapletCalibration::~CTSMMCapletCalibration() = default;

CTSMMCapletCalibration::CTSMMCapletCalibration(
EvolutionDescription evolution,
ext::shared_ptr<PiecewiseConstantCorrelation> corr,
Expand Down
2 changes: 1 addition & 1 deletion ql/models/marketmodels/models/ctsmmcapletcalibration.hpp
Expand Up @@ -34,7 +34,7 @@ namespace QuantLib {

class CTSMMCapletCalibration {
public:
virtual ~CTSMMCapletCalibration();
virtual ~CTSMMCapletCalibration() = default;
CTSMMCapletCalibration(
EvolutionDescription evolution,
ext::shared_ptr<PiecewiseConstantCorrelation> corr,
Expand Down
30 changes: 0 additions & 30 deletions ql/models/marketmodels/models/volatilityinterpolationspecifier.cpp

This file was deleted.

Expand Up @@ -38,9 +38,9 @@ namespace QuantLib
{
class VolatilityInterpolationSpecifier
{
public:
VolatilityInterpolationSpecifier();
virtual ~VolatilityInterpolationSpecifier();
public:
VolatilityInterpolationSpecifier() = default;
virtual ~VolatilityInterpolationSpecifier() = default;
virtual void setScalingFactors(const std::vector<Real>& scales)=0;
virtual void setLastCapletVol(Real vol)=0;

Expand All @@ -52,9 +52,6 @@ namespace QuantLib
virtual Size getOffset() const=0;
virtual Size getNoBigRates() const=0;
virtual Size getNoSmallRates() const=0;



};
}

Expand Down

0 comments on commit 81d0f5b

Please sign in to comment.