diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-09-10 19:33:09 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-09-10 19:33:09 +0000 |
commit | 9576101b9d6762bbf0e05c3a5ca96e5787e777a0 (patch) | |
tree | 856535fdc10c9ac445f1b7408ca0e32d11727cd4 /libstdc++-v3 | |
parent | c7102fdc09d17de8d40381d68392a5f399dd3dd6 (diff) |
* testsuite/util/testsuite_allocator.h (PointerBase::operator[]): Add.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227661 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 2 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/util/testsuite_allocator.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 79c3f5168029..8516782cf580 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,7 @@ 2015-09-10 Jonathan Wakely <jwakely@redhat.com> + * testsuite/util/testsuite_allocator.h (PointerBase::operator[]): Add. + * testsuite/21_strings/basic_string/operators/char/1.cc: Verify the string contents. diff --git a/libstdc++-v3/testsuite/util/testsuite_allocator.h b/libstdc++-v3/testsuite/util/testsuite_allocator.h index 090e5919fb98..ebe7de0981e9 100644 --- a/libstdc++-v3/testsuite/util/testsuite_allocator.h +++ b/libstdc++-v3/testsuite/util/testsuite_allocator.h @@ -575,6 +575,7 @@ namespace __gnu_test T& operator*() const { return *value; } T* operator->() const { return value; } + T& operator[](difference_type n) const { return value[n]; } Derived& operator++() { ++value; return derived(); } Derived operator++(int) { Derived tmp(derived()); ++value; return tmp; } |