logo       
Google Custom Search
    AddThis Social Bookmark Button

[patch] row::operator[] - template version: msg#00066

Subject: [patch] row::operator[] - template version
Here's the template version of the patch, for evaluation.

Applies to CVS.

- Chris


Index: lib/row.h
===================================================================
--- lib/row.h   (revision 1119)
+++ lib/row.h   (working copy)
@@ -119,11 +119,10 @@
        /// supposed to throw an exception, according to the Standard.
        ///
        /// This function is just syntactic sugar, wrapping the at() method.
-       /// The at() method is the only way to get at the first field by
-       /// index, as row[0] is ambiguous: it could call either overload.
        ///
        /// See operator[](const char*) for more caveats.
-       const ColData operator [](size_type i) const
+       template <class IndexT>
+       const ColData operator [](IndexT i) const
        {
                return at(i);
        }


-- 
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:    
http://lists.mysql.com/plusplus?unsub=gcdmc-plusplus@xxxxxxxxxxx





Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>