Hello, Can somebody lend any insights into this?I am trying to compile QuantlibXL 1.3.0 in Visual Studio 2012. I am getting the following error: 3>------ Build started: Project: QuantLibObjects, Configuration: Release (static runtime) Win32 ------ 3> interpolation.cpp 3>qlo\interpolation.cpp(77): error C2664: 'std::make_pair' : cannot convert parameter 1 from 'const double' to 'QuantLib::Real &&' 3> Conversion loses qualifiers Thanks, Ali ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Actually it compiles if I change this: apparently there's been some change in Visual C++ 11 where I guess you aren't supposed to explicitly specify the datatypes in make_pair?pairs[i] = std::make_pair<Real, Handle<Quote> >(x[i], yh[i]); to this: pairs[i] = std::make_pair(x[i], yh[i]); On Wed, Sep 4, 2013 at 4:37 AM, Ali Hassani <[hidden email]> wrote:
------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
As far as I know, with std::make_pair you were never supposed to explicitly specify the datatypes. In fact, that’s exactly the point of using std::make_pair
instead of calling the std::pair constructors directly: constructors require that you specify the types, functions resolve them automatically. I am not sure whether the C++ standard allows for specifying the types explicitly, but the recommended syntax is and has always been without types. Gerardo Gerardo Ballabio Risk Management Banca Profilo S.p.A.
Via Cerva 28 - 20122 Milano
Tel. +39 02 58408.463 Da: Ali Hassani [mailto:[hidden email]]
Actually it compiles if I change this: apparently there's been some change in Visual C++ 11 where I guess you aren't supposed to explicitly specify the datatypes in make_pair? On Wed, Sep 4, 2013 at 4:37 AM, Ali Hassani <[hidden email]> wrote: Hello, Can somebody lend any insights into this?
------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Yes, the point of make_pair is to call it without specifying the types. It shouldn't hurt, though. The error might have to do with the changes to support C++11 (seeing as a right-value reference type is mentioned in the error message). Anyway, I'll change it in the repository.On Thu, Sep 5, 2013 at 7:44 AM, Ballabio Gerardo <[hidden email]> wrote:
-- <https://implementingquantlib.blogspot.com> <https://twitter.com/lballabio> ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |