Added test case.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11386 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e1b5d43cd8
commit
31436be60f
1 changed files with 22 additions and 0 deletions
22
Examples/test-suite/cpp0x_template_explicit.i
Normal file
22
Examples/test-suite/cpp0x_template_explicit.i
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
/* This unit tests whether Swig correctly parses the code and makes wrappers
|
||||||
|
for the new C++0x extern templates (explicit template instantiation without
|
||||||
|
using the translation unit).
|
||||||
|
*/
|
||||||
|
%module cpp0x_template_explicit
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
class A {
|
||||||
|
public:
|
||||||
|
int member;
|
||||||
|
int memberFunction() { return 100; }
|
||||||
|
};
|
||||||
|
|
||||||
|
template class std::vector<A>;
|
||||||
|
extern template class std::vector<A>;
|
||||||
|
|
||||||
|
template class std::vector<A*>;
|
||||||
|
extern template class std::vector<A*>;
|
||||||
|
%}
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue