Hi,
You are right, "make_pair()' has changed in C++ 11 version. The following is
the explanation of Stephan T. Lavavej of Visual C++ Libraries Developer.
C++03: template <class T1, class T2> pair<T1, T2> make_pair(T1 x, T2 y);
C++11: template <class T1, class T2> pair<V1, V2> make_pair(T1&& x, T2&& y);
There are several subtleties in both the C++03 and C++11 versions (C++03 taking
values - changed from C++98 - and C++11 returning decayed types). As I recall,
VC10 had four overloads, which may or may not have corresponded to a Working
Paper at some point in time, but the final version of C++11 specifies the
single function template above, and that's what we've implemented in VC11. It's
Saturday, so I hope you won't mind if I skip directly to the high-level summary:
C++11 make_pair() is now a perfect forwarding function. This is a good thing
(it's more efficient), but it's also incompatible with most uses of explicit
template arguments. As it turns out, that's fine because make_pair()'s whole
purpose in life is to be used WITHOUT explicit template arguments.
He also gives the suggestion of this situation, we can get the detail from the
page:
http://connect.microsoft.com/VisualStudio/feedback/details/691756/std-make-pair-error-in-vc11
Jianfeng Zhao
Inner Mongolia University of Science and Technology
[email protected]
发件人: Hauke Heibel
发送时间: 2013年9月30日, 星期一 16:56
收件人: [email protected]
抄送: [email protected]
Hi,
I think the use of std::make_pair in OptionList.cxx is causing the issue.
Either directly instantiate a std::pair or apply a static_cast to the
parameters of std::make_pair. The helper std::make_pair is intended to be used
without explicitly specifying the template parameters; they should be
automatically deduced.
Regards,
Hauke
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers