We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36d0f35 commit 95d4e92Copy full SHA for 95d4e92
1 file changed
QuantExt/qle/cashflows/blackaveragebmacouponpricer.cpp
@@ -59,7 +59,7 @@ Real BlackAverageBMACouponPricer::optionletRate(Option::Type optionType, Real ef
59
std::vector<Date> fixingDates = coupon_->underlying()->fixingDates();
60
QL_REQUIRE(!fixingDates.empty(),
61
"BlackAverageBMACouponPricer: internal error, got empty fixingDates, contact dev.");
62
- fixingDates.erase(fixingDates.back()); // there is one additional date returned!
+ fixingDates.erase(std::next(fixingDates.end(), -1)); // there is one additional date returned!
63
QL_REQUIRE(!fixingDates.empty(), "BlackAverageBMACouponPricer: empty fixing dates");
64
bool shiftedLn = capletVolatility()->volatilityType() == ShiftedLognormal;
65
Real shift = capletVolatility()->displacement();
0 commit comments