Error Compiling QuantlibXL 1.3.0 in Visual Studio 2012

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Error Compiling QuantlibXL 1.3.0 in Visual Studio 2012

Ali Hassani
Hello,

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

Can somebody lend any insights into this?

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
Reply | Threaded
Open this post in threaded view
|

Re: Error Compiling QuantlibXL 1.3.0 in Visual Studio 2012

Ali Hassani
Actually it compiles if I change this:

pairs[i] = std::make_pair<Real, Handle<Quote> >(x[i], yh[i]);

to this:

pairs[i] = std::make_pair(x[i], yh[i]);

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,

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

Can somebody lend any insights into this?

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=58041391&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

R: Error Compiling QuantlibXL 1.3.0 in Visual Studio 2012

Ballabio Gerardo-4

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

www.bancaprofilo.it

 

Descrizione: http://www.bancaprofilo.it/~/media/Images/B/Banca-Profilo/logo/logo.jpg

 

 

Da: Ali Hassani [mailto:[hidden email]]
Inviato: giovedì 5 settembre 2013 0.03
A: quantlib-users
Oggetto: Re: [Quantlib-users] Error Compiling QuantlibXL 1.3.0 in Visual Studio 2012

 

Actually it compiles if I change this:

pairs[i] = std::make_pair<Real, Handle<Quote> >(x[i], yh[i]);

to this:

pairs[i] = std::make_pair(x[i], yh[i]);

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,

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

Can somebody lend any insights into this?

Thanks,

Ali

 




Banca Profilo S.p.A. Via Cerva, 28 - 20122 Milano - Tel. 02 58408.1, Fax 02 5831 6057 Capitale Sociale Euro 136.794.106,00 i.v. Iscrizione al Registro Imprese di Milano, C.F. e P.IVA 09108700155 - [hidden email] Iscritta all’Albo delle Banche e dei Gruppi bancari Aderente al Fondo Interbancario di Tutela dei depositi Aderente al Conciliatore Bancario Finanziario e all’Arbitro Bancario Finanziario Appartenente al Gruppo bancario Banca Profilo e soggetta all’attività di direzione e coordinamento di Arepo BP S.p.A. DISCLAIMER: The information transmitted may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

------------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|

Re: R: Error Compiling QuantlibXL 1.3.0 in Visual Studio 2012

Luigi Ballabio
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.

Luigi



On Thu, Sep 5, 2013 at 7:44 AM, Ballabio Gerardo <[hidden email]> wrote:

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

www.bancaprofilo.it

 

Descrizione: http://www.bancaprofilo.it/~/media/Images/B/Banca-Profilo/logo/logo.jpg

 

 

Da: Ali Hassani [mailto:[hidden email]]
Inviato: giovedì 5 settembre 2013 0.03
A: quantlib-users
Oggetto: Re: [Quantlib-users] Error Compiling QuantlibXL 1.3.0 in Visual Studio 2012

 

Actually it compiles if I change this:

pairs[i] = std::make_pair<Real, Handle<Quote> >(x[i], yh[i]);

to this:

pairs[i] = std::make_pair(x[i], yh[i]);

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,

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

Can somebody lend any insights into this?

Thanks,

Ali

 




Banca Profilo S.p.A. Via Cerva, 28 - 20122 Milano - Tel. 02 58408.1, Fax 02 5831 6057 Capitale Sociale Euro 136.794.106,00 i.v. Iscrizione al Registro Imprese di Milano, C.F. e P.IVA 09108700155 - [hidden email] Iscritta all’Albo delle Banche e dei Gruppi bancari Aderente al Fondo Interbancario di Tutela dei depositi Aderente al Conciliatore Bancario Finanziario e all’Arbitro Bancario Finanziario Appartenente al Gruppo bancario Banca Profilo e soggetta all’attività di direzione e coordinamento di Arepo BP S.p.A. DISCLAIMER: The information transmitted may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

------------------------------------------------------------------------------
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




--
<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