Rename all C++0x to C++11 and cpp0x to cpp11
This commit is contained in:
parent
173c4b3bba
commit
738cc36aab
52 changed files with 307 additions and 307 deletions
20
Examples/test-suite/cpp11_result_of.i
Normal file
20
Examples/test-suite/cpp11_result_of.i
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/* This testcase checks whether SWIG correctly uses the new result_of class
|
||||
and its templating capabilities introduced in C++11. */
|
||||
%module cpp11_result_of
|
||||
|
||||
%inline %{
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
|
||||
double square(double x) {
|
||||
return (x * x);
|
||||
}
|
||||
|
||||
template<class Fun, class Arg>
|
||||
typename std::result_of<Fun(Arg)>::type test_result_impl(Fun fun, Arg arg) {
|
||||
return fun(arg);
|
||||
}
|
||||
%}
|
||||
|
||||
%template(test_result) test_result_impl<double(*)(double), double>;
|
||||
%constant double (*SQUARE)(double) = square;
|
||||
Loading…
Add table
Add a link
Reference in a new issue