mirror of https://github.com/swig/swig
Attempt to fix cpp11_result_of for MSVC
MSVC fails with: cpp11_result_of_wrap.cxx(3211): error C2672: 'test_result_impl': no matching overloaded function found cpp11_result_of_wrap.cxx(3211): error C2893: Failed to specialize function template 'std::result_of<Fun(Arg)>::type test_result_impl(Fun,Arg)' cpp11_result_of_wrap.cxx(3150): note: see declaration of 'test_result_impl' cpp11_result_of_wrap.cxx(3211): note: With the following template arguments: cpp11_result_of_wrap.cxx(3211): note: 'Fun=double (__cdecl *)(double)' cpp11_result_of_wrap.cxx(3211): note: 'Arg=int' Try making the second parameter double to match the template.
This commit is contained in:
parent
4a15f3934d
commit
4f44d0a1ea
|
@ -55,10 +55,10 @@ std::result_of< fn_ptr(double) >::type test_result_alternative1(double(*fun)(dou
|
|||
#include <iostream>
|
||||
|
||||
void cpp_testing() {
|
||||
std::cout << "result: " << test_result_impl(square, 3) << std::endl;
|
||||
std::cout << "result: " << test_result_impl<double(*)(double), double>(square, 4) << std::endl;
|
||||
std::cout << "result: " << test_result_impl< fn_ptr, double >(square, 5) << std::endl;
|
||||
std::cout << "result: " << test_result_alternative1(square, 6) << std::endl;
|
||||
std::cout << "result: " << test_result_impl(square, 3.0) << std::endl;
|
||||
std::cout << "result: " << test_result_impl<double(*)(double), double>(square, 4.0) << std::endl;
|
||||
std::cout << "result: " << test_result_impl< fn_ptr, double >(square, 5.0) << std::endl;
|
||||
std::cout << "result: " << test_result_alternative1(square, 6.0) << std::endl;
|
||||
}
|
||||
%}
|
||||
|
||||
|
|
Loading…
Reference in New Issue