Add missing typedefs to std::list + typedef corrections

Numerous missing typedefs added.
std::list<T*>::const_reference and std::list<T*>::reference
specialization typedef fixes.
This commit is contained in:
William S Fulton 2019-02-14 07:31:21 +00:00
commit 440264e479
6 changed files with 39 additions and 32 deletions

View file

@ -13,16 +13,20 @@
%}
namespace std{
namespace std {
template<class T> class list
{
public:
typedef T &reference;
typedef const T& const_reference;
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 T &iterator;
typedef const T& const_iterator;
list();
list(unsigned int size, const T& value = T());
list(const list<T>& other);
@ -35,28 +39,25 @@ namespace std{
const_reference back();
const_iterator begin();
const_iterator end();
void resize(unsigned int n, T c = T());
bool empty() const;
void push_front(const T& x);
void push_back(const T& x);
void pop_front();
void pop_back();
void clear();
unsigned int size() const;
unsigned int max_size() const;
void resize(unsigned int n, const T& value);
void remove(const T& value);
void unique();
void reverse();
void sort();
%extend
{
const_reference __getitem__(int i) throw (std::out_of_range)
@ -206,9 +207,7 @@ namespace std{
{
self->pop_back();
}
};
}
};
}