Update of /cvsroot/mahogany/M/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15390/include

Modified Files:
        pointers.h 
Log Message:
operator[] is useful for an array-like class

Index: pointers.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/pointers.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -b -u -2 -r1.9 -r1.10
--- pointers.h  11 Jul 2004 12:55:44 -0000      1.9
+++ pointers.h  11 Jul 2004 13:03:55 -0000      1.10
@@ -355,4 +355,10 @@
    }
 
+   /// Return the n-th element
+   T& operator[](size_t n) const
+   {
+      return m_pointer[n];
+   }
+
    /// Return stored pointer.
    T *get() const { return m_pointer; }



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to