From a7890973856c5d2e49392b6c4a1175ccb222a030 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 10 Sep 2015 20:33:09 +0100 Subject: [PATCH] * testsuite/util/testsuite_allocator.h (PointerBase::operator[]): Add. From-SVN: r227661 --- libstdc++-v3/ChangeLog | 2 ++ libstdc++-v3/testsuite/util/testsuite_allocator.h | 1 + 2 files changed, 3 insertions(+) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 79c3f516802..8516782cf58 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,7 @@ 2015-09-10 Jonathan Wakely + * 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 090e5919fb9..ebe7de0981e 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; } -- 2.30.2