| Chris Frey 2005-09-17, 8:23 pm |
| Here's the int style patch to row.h, for evaluation. It's not as clean
as the template solution, but there is less chance of weird error
messages.
Applies against CVS.
- Chris
Index: lib/row.h
====================
====================
====================
=======
--- lib/row.h (revision 1119)
+++ lib/row.h (working copy)
@@ -130,6 +130,18 @@
/// \brief Get the value of a field given its index.
///
+ /// If the index value is bad, the underlying std::vector is
+ /// supposed to throw an exception, according to the Standard.
+ ///
+ /// This function provides the int overload so row[0] is not
+ /// ambiguous.
+ const ColData operator [](int i) const
+ {
+ return at(i);
+ }
+
+ /// \brief Get the value of a field given its index.
+ ///
/// If the index is out-of-bounds, the underlying vector is supposed
/// to throw an exception according to the C++ Standard. Whether it
/// actually does this is implementation-dependent.
--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?uns...sie.nctu.edu.tw
|