[ quantlib-Bugs-3415446 ] Build error when comiling with VC11

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ quantlib-Bugs-3415446 ] Build error when comiling with VC11

SourceForge.net
Bugs item #3415446, was opened at 2011-09-29 12:12
Message generated for change (Comment added) made by alvinchalon
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112740&aid=3415446&group_id=12740

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Thomas A Sullivan (tomsullivan34)
Assigned to: Nobody/Anonymous (nobody)
Summary: Build error when comiling with VC11

Initial Comment:
1>------ Build started: Project: QuantLib, Configuration: Debug Win32 ------
1>Build started 9/29/2011 3:09:10 PM.
1>ClCompile:
1>  symmetricschurdecomposition.cpp
1>ql\math\matrixutilities\symmetricschurdecomposition.cpp(123): error C2664: 'std::make_pair' : cannot convert parameter 1 from 'QuantLib::Real' to 'QuantLib::Real &&'
1>          You cannot bind an lvalue to an rvalue reference
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:03.09
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I modified this code:
            temp[col] = std::make_pair<Real, std::vector<Real> >(
                diagonal_[col], eigenVector);

to this:
            temp[col] = std::make_pair<Real, std::vector<Real> >(
                (Real&&)diagonal_[col], (std::vector<Real>&&)eigenVector);

and it built ok.


----------------------------------------------------------------------

Comment By: Alvin (Xiangyu Hong) (alvinchalon)
Date: 2012-08-31 14:21

Message:
change it to:
   temp[col] = std::make_pair(diagonal_[col], eigenVector);
would be fine.
--------
one could refer to
http://connect.microsoft.com/VisualStudio/feedback/details/691756/std-make-pair-error-in-vc11
as "make_pair()'s whole purpose in life is to be used WITHOUT explicit
template arguments."


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112740&aid=3415446&group_id=12740

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev