Added testcase for function objects.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11419 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
523817e4ee
commit
e949fa3cc7
3 changed files with 34 additions and 2 deletions
18
Examples/test-suite/cpp0x_function_objects.i
Normal file
18
Examples/test-suite/cpp0x_function_objects.i
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/* This testcase checks whether Swig correctly parses function objects
|
||||
and the templates for the functions (signature).
|
||||
Function objects are objects which overload the operator() function. */
|
||||
%module cpp0x_function_objects
|
||||
|
||||
%inline %{
|
||||
//function<int ( int, int )> pF; // not supported yet by the compiler
|
||||
|
||||
struct Test {
|
||||
int value;
|
||||
|
||||
void operator()(short x, short y) {
|
||||
value=10;
|
||||
}
|
||||
|
||||
} test;
|
||||
%}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue