Engine icon indicating copy to clipboard operation
Engine copied to clipboard

build error

Open jonreiter opened this issue 5 years ago • 1 comments

building ore-swig i get an error building the ore code:

ore/QuantExt/qle/termstructures/kinterpolatedyoyoptionletvolatilitysurface.hpp:121:56: error: no viable conversion from 'const shared_ptr<QuantExt::YoYInflationCapFloorEngine>' to 'const shared_ptr<QuantLib::YoYInflationCapFloorEngine>'
    yoyOptionletStripper_->initialize(capFloorPrices_, yoyInflationCouponPricer_, slope_);

this is fixed by prepending QuantLib:: to every YoYInflationCapFloorEngine in that file or by rejigging QuantExt::YoYInflationCapFloorEngine to derive from QuantLib::YoYInflationCapFloorEngine instead of QuantLib::YoYInflationCapFloor::engine. the later also requires adding a (straightforward) non-default constructor call.

i am not familiar with the code base but it looks like many types exist in both the QuantExt and QuantLib namespaces but the code doesn't appear to (need to) specify namespace much. none of the relevant quantext subclasses appear to implement initialize() so both look fine i think. but i am not sure which approach is more consistent with the style here or if something else should be done.

jonreiter avatar Jan 25 '21 02:01 jonreiter

The ORE SWIG wrappers have evolved in the meantime. Would you please check out the latest master branch in ORE and ORE-SWIG and see whether this namespace mixup still persists?

QuaternionRisk avatar Aug 26 '22 08:08 QuaternionRisk