* testsuite/util/testsuite_allocator.h (PointerBase::operator[]): Add.
authorJonathan Wakely <jwakely@redhat.com>
Thu, 10 Sep 2015 19:33:09 +0000 (20:33 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 10 Sep 2015 19:33:09 +0000 (20:33 +0100)
From-SVN: r227661

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/util/testsuite_allocator.h

index 79c3f5168029da35facd5a3c7f60fa9e96bc9f1b..8516782cf580c6b7362d1f73a70f2d6b660f8d97 100644 (file)
@@ -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.
 
index 090e5919fb988fac107f0cc0f7799604ff2c7800..ebe7de0981e9691ec4b42ceb827f147428eea342 100644 (file)
@@ -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; }