fix copyctor + template bug #1432125

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8820 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-02-16 05:30:26 +00:00
commit 88023f8b82
3 changed files with 43 additions and 1 deletions

View file

@ -93,6 +93,7 @@ CPP_TEST_CASES += \
const_const_2 \
constant_pointers \
constover \
constructor_copy \
constructor_exception \
constructor_explicit \
constructor_value \

View file

@ -1,5 +1,6 @@
%module constructor_copy
%copyctor;
%nocopyctor Foo8;
%nocopyctor Bar<double>;
@ -67,3 +68,42 @@ public:
%template(Bard) Bar<double>;
%{
#include <vector>
%}
namespace std {
template<class T> class vector {
public:
typedef size_t size_type;
typedef T value_type;
typedef const value_type& const_reference;
vector();
vector(size_type n);
};
}
%copyctor;
//%ignore std::vector<Space::Flow>::vector(size_type);
%ignore std::vector<Space::Flow>::resize(size_type);
//Ignore as Flow does not have a default constructor
%inline %{
namespace Space {
class Flow {
public:
Flow() {}
Flow(int i) {}
Flow(const Flow& other) {}
};
}
%}
%template (VectFlow) std::vector<Space::Flow>;