Fix problems in Go support revealed by recent test cases.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12922 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
589ae60501
commit
eb5130814d
2 changed files with 62 additions and 17 deletions
40
Lib/go/std_list.i
Normal file
40
Lib/go/std_list.i
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
/* -----------------------------------------------------------------------------
|
||||
* std_vector.i
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
%{
|
||||
#include <list>
|
||||
#include <stdexcept>
|
||||
%}
|
||||
|
||||
namespace std {
|
||||
|
||||
template<class T, class Alloc = allocator<T> >
|
||||
class list {
|
||||
public:
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef T value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef const value_type* const_pointer;
|
||||
typedef value_type& reference;
|
||||
typedef const value_type& const_reference;
|
||||
typedef Alloc allocator_type;
|
||||
|
||||
list();
|
||||
size_type size() const;
|
||||
bool empty() const;
|
||||
%rename(isEmpty) empty;
|
||||
void clear();
|
||||
void push_front(const value_type& x);
|
||||
void pop_front();
|
||||
void push_back(const value_type& x);
|
||||
void pop_back();
|
||||
void remove(value_type x);
|
||||
void reverse();
|
||||
void unique();
|
||||
void sort();
|
||||
void merge(list& x);
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue