Fix for vector of bool
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8076 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b4ee03629e
commit
6b73e09521
2 changed files with 16 additions and 89 deletions
|
|
@ -170,6 +170,7 @@
|
|||
public:
|
||||
typedef size_t size_type;
|
||||
typedef CTYPE value_type;
|
||||
typedef const value_type& const_reference;
|
||||
%rename(Clear) clear;
|
||||
void clear();
|
||||
%rename(Add) push_back;
|
||||
|
|
@ -197,7 +198,7 @@
|
|||
else
|
||||
throw std::out_of_range("index");
|
||||
}
|
||||
const value_type& getitem(int index) throw (std::out_of_range) {
|
||||
const_reference getitem(int index) throw (std::out_of_range) {
|
||||
if (index>=0 && index<(int)self->size())
|
||||
return (*self)[index];
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue