Fix #3475492 - iterating through std::vector wrappers of enumerations.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12916 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3340045d67
commit
50693941c6
13 changed files with 253 additions and 0 deletions
23
Examples/test-suite/li_std_vector_enum.i
Normal file
23
Examples/test-suite/li_std_vector_enum.i
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
%module li_std_vector_enum
|
||||
|
||||
%include "std_vector.i"
|
||||
|
||||
%inline %{
|
||||
class EnumVector {
|
||||
public:
|
||||
EnumVector() { fill_numbers(); }
|
||||
|
||||
enum numbers {ten=10, twenty=20, thirty=30};
|
||||
|
||||
std::vector<numbers> nums;
|
||||
|
||||
void fill_numbers() {
|
||||
nums.push_back(ten);
|
||||
nums.push_back(twenty);
|
||||
nums.push_back(thirty);
|
||||
}
|
||||
};
|
||||
%}
|
||||
|
||||
%template(vector_numbers) std::vector<EnumVector::numbers>;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue