Skip to content

Commit

Permalink
Try avoiding warnings in VC++13.
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed May 18, 2020
1 parent b73d626 commit f7b9cb2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
9 changes: 9 additions & 0 deletions ql/methods/finitedifferences/fdtypedefs.hpp
Expand Up @@ -43,12 +43,21 @@ namespace QuantLib {
typedef StepCondition<Array> StandardStepCondition;


#if defined(QL_PATCH_MSVC)
#pragma warning(push)
#pragma warning(disable:4996)
#endif

/*! \deprecated Inherit from StandardStepCondition directly.
Deprecated in version 1.19.
*/
QL_DEPRECATED
typedef CurveDependentStepCondition<Array> StandardCurveDependentStepCondition;

#if defined(QL_PATCH_MSVC)
#pragma warning(pop)
#endif

}


Expand Down
13 changes: 12 additions & 1 deletion ql/methods/finitedifferences/stepcondition.hpp
Expand Up @@ -38,7 +38,7 @@ namespace QuantLib {
virtual void applyTo(array_type& a, Time t) const = 0;
};

/* */

/*! Abstract base class which allows step conditions to use both
payoff and array functions.
Expand All @@ -57,12 +57,23 @@ namespace QuantLib {
}
}
protected:

#if defined(QL_PATCH_MSVC)
#pragma warning(push)
#pragma warning(disable:4996)
#endif

CurveDependentStepCondition(Option::Type type, Real strike)
: curveItem_(new PayoffWrapper(type, strike)) {};
CurveDependentStepCondition(const Payoff *p)
: curveItem_(new PayoffWrapper(p)) {};
CurveDependentStepCondition(const array_type & a)
: curveItem_(new ArrayWrapper(a)) {};

#if defined(QL_PATCH_MSVC)
#pragma warning(pop)
#endif

class CurveWrapper;

ext::shared_ptr<CurveWrapper> curveItem_;
Expand Down

0 comments on commit f7b9cb2

Please sign in to comment.