Why do I get this error; error C2664: 'QuantLib::Observer::registerWith' : cannot convert parameter 1 from 'boost::shared_ptr<T>' to 'const boost::shared_ptr<T> &' with this code; RelinkableHandle<Exercise> EXERCISE; switch(_ExType) { case ExerciseType::AMERICAN: { boost::shared_ptr<Exercise> AmericanEx( new AmericanExercise(SimulationDate, _Maturity)); EXERCISE.linkTo(AmericanEx); } break; case ExerciseType::EUROPIAN: { boost::shared_ptr<Exercise> EuropianEx(new EuropeanExercise(_Maturity)); EXERCISE.linkTo(EuropianEx); } break; } I was using RelinkableHandle before but never saw this error. Seyfullah. ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412 _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
check the details on the Ts in the message you get: Exercise is not an observable, but a Handle only accepts observables as underlyings.
2013/1/14 Seyfullah ÇETİN <[hidden email]>
------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412 _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |