inline void CompositeZeroYieldStructure<BinaryFunction>::update() {
     if (!curve1_.empty() && !curve2_.empty()) {
         YieldTermStructure::update();
         enableExtrapolation(curve1_->allowsExtrapolation() && curve2_->allowsExtrapolation());
     }
     else {
         /* The implementation inherited from YieldTermStructure
         asks for our reference date, which we don't have since
         the original curve is still not set. Therefore, we skip
         over that and just call the base-class behavior. */
         TermStructure::update();
     }
 }
    inline CompositeZeroYieldStructure<BinaryFunction>::CompositeZeroYieldStructure(
        const Handle<YieldTermStructure>& h1, 
        const Handle<YieldTermStructure>& h2, 
        const BinaryFunction& f,
        Compounding comp, 
        Frequency freq)
    : curve1_(h1), curve2_(h2), f_(f), comp_(comp), freq_(freq) {
        if (!curve1_.empty() && !curve2_.empty())
            enableExtrapolation(curve1_->allowsExtrapolation() && curve2_->allowsExtrapolation());

        registerWith(curve1_);
        registerWith(curve2_);
    }
 inline ZeroSpreadedTermStructure::ZeroSpreadedTermStructure(
                                       const Handle<YieldTermStructure>& h,
                                       const Handle<Quote>& spread,
                                       Compounding comp,
                                       Frequency freq,
                                       const DayCounter& dc)
 : originalCurve_(h), spread_(spread), comp_(comp), freq_(freq), dc_(dc) {
     //QL_REQUIRE(h->dayCounter()==dc_,
     //           "spread daycounter (" << dc_ <<
     //           ") must be the same of the curve to be spreaded (" <<
     //           originalCurve_->dayCounter() <<
     //           ")");
     enableExtrapolation(originalCurve_->allowsExtrapolation());
     registerWith(originalCurve_);
     registerWith(spread_);
 }