summaryrefslogtreecommitdiff
path: root/Lib/go
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2019-02-13 00:04:26 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2019-02-13 22:46:28 +0000
commite26f6bb4e21b7adc90fcd916ec3cbd39e583637e (patch)
tree7495046b14766f26ca0a27b4c7eaf4b5127ee7bd /Lib/go
parenta47c2553f512f8ad1e1c076a81e0baa84fc5f2a1 (diff)
downloadswig-e26f6bb4e21b7adc90fcd916ec3cbd39e583637e.tar.gz
Add missing typedefs to std::vector + typedef corrections
Tests for std::vector of pointers added which check std::vector<T*>::const_reference and std::vector<T*>::reference usage which gave compilation errors in Python and Perl which had specialized these vectors incorrectly.
Diffstat (limited to 'Lib/go')
-rw-r--r--Lib/go/std_vector.i10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/go/std_vector.i b/Lib/go/std_vector.i
index 29bcd1391..708e5ee38 100644
--- a/Lib/go/std_vector.i
+++ b/Lib/go/std_vector.i
@@ -12,8 +12,13 @@ namespace std {
template<class T> class vector {
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;
+
vector();
vector(size_type n);
size_type size() const;
@@ -46,8 +51,13 @@ namespace std {
template<> class vector<bool> {
public:
typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
typedef bool value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
typedef bool const_reference;
+
vector();
vector(size_type n);
size_type size() const;