diff --git a/ql/instruments/complexchooseroption.cpp b/ql/instruments/complexchooseroption.cpp index f930c017c88..ddba000ffba 100644 --- a/ql/instruments/complexchooseroption.cpp +++ b/ql/instruments/complexchooseroption.cpp @@ -20,6 +20,7 @@ #include #include #include +#include namespace QuantLib { @@ -28,14 +29,14 @@ namespace QuantLib { Real strikeCall, Real strikePut, const ext::shared_ptr& exerciseCall, - const ext::shared_ptr& exercisePut) + ext::shared_ptr exercisePut) : OneAssetOption(ext::make_shared(Option::Call, strikeCall), exerciseCall), choosingDate_(choosingDate), strikeCall_(strikeCall), strikePut_(strikePut), exerciseCall_(exerciseCall), - exercisePut_(exercisePut) {} + exercisePut_(std::move(exercisePut)) {} void ComplexChooserOption::setupArguments(PricingEngine::arguments* args) const { OneAssetOption::setupArguments(args); diff --git a/ql/instruments/complexchooseroption.hpp b/ql/instruments/complexchooseroption.hpp index 948275bf7f9..6421ff9acbb 100644 --- a/ql/instruments/complexchooseroption.hpp +++ b/ql/instruments/complexchooseroption.hpp @@ -42,7 +42,7 @@ namespace QuantLib{ Real strikeCall, Real strikePut, const ext::shared_ptr& exerciseCall, - const ext::shared_ptr& exercisePut); + ext::shared_ptr exercisePut); void setupArguments(PricingEngine::arguments*) const override; private: