26#include <ql/types.hpp>
27#include <boost/variant.hpp>
32typedef boost::variant<QuantLib::Period, QuantLib::Natural>
PaymentLag;
36 QuantLib::Period
operator()(
const QuantLib::Natural& n)
const {
return Period(n, Days); }
37 QuantLib::Period
operator()(
const QuantLib::Period& p)
const {
return p; }
42 QuantLib::Natural
operator()(
const QuantLib::Natural& n)
const {
return n; }
43 QuantLib::Natural
operator()(
const QuantLib::Period& p)
const {
return static_cast<QuantLib::Natural
>(days(p)); }
boost::variant< QuantLib::Period, QuantLib::Natural > PaymentLag
Serializable Credit Default Swap.
QuantLib::Natural operator()(const QuantLib::Natural &n) const
QuantLib::Natural operator()(const QuantLib::Period &p) const
QuantLib::Period operator()(const QuantLib::Natural &n) const
QuantLib::Period operator()(const QuantLib::Period &p) const