34 std::vector<ext::shared_ptr<Dividend> >
36 const std::vector<Real>& dividends) {
38 QL_REQUIRE(dividendDates.size() == dividends.size(),
39 "size mismatch between dividend dates and amounts");
41 std::vector<Date>::const_iterator dd;
42 std::vector<Real>::const_iterator
d;
43 std::vector<ext::shared_ptr<Dividend> > items;
44 items.reserve(dividendDates.size());
45 for (dd = dividendDates.begin(),
d = dividends.begin();
46 dd != dividendDates.end(); ++dd, ++
d) {
47 items.push_back(ext::shared_ptr<Dividend>(
new
degenerate base class for the Acyclic Visitor pattern
void accept(AcyclicVisitor &) override
Visitor for a specific class
virtual void visit(T &)=0
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
std::vector< ext::shared_ptr< Dividend > > DividendVector(const std::vector< Date > ÷ndDates, const std::vector< Real > ÷nds)
helper function building a sequence of fixed dividends
ext::shared_ptr< BlackVolTermStructure > v
degenerate base class for the Acyclic Visitor pattern