From: Jonathan Wakely Date: Thu, 10 Sep 2015 19:33:09 +0000 (+0100) Subject: * testsuite/util/testsuite_allocator.h (PointerBase::operator[]): Add. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a7890973856c5d2e49392b6c4a1175ccb222a030;p=gcc.git * testsuite/util/testsuite_allocator.h (PointerBase::operator[]): Add. From-SVN: r227661 --- 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; }