List:MySQL++« Previous MessageNext Message »
From:Chris Frey Date:September 18 2005 1:13am
Subject:[patch] row::operator[] - template version
View as plain text  
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);
 	}

Thread
[patch] row::operator[] - template versionChris Frey18 Sep
  • Re: [patch] row::operator[] - template versionWarren Young19 Sep
    • Re: [patch] row::operator[] - template versionWarren Young19 Sep
      • Re: [patch] row::operator[] - template versionChris Frey19 Sep
        • Re: [patch] row::operator[] - template versionWarren Young19 Sep
          • Re: [patch] row::operator[] - template versionChris Frey19 Sep
Re: [patch] row::operator[] - template versionChris Frey18 Sep
  • Re: [patch] row::operator[] - template versionUnknown Sender18 Sep
    • Re: [patch] row::operator[] - template versionChris Frey18 Sep
      • Re: [patch] row::operator[] - template versionUnknown Sender18 Sep
        • Re: [patch] row::operator[] - template versionWarren Young19 Sep
          • Re: [patch] row::operator[] - template versionUnknown Sender19 Sep
            • Re: [patch] row::operator[] - template versionWarren Young19 Sep
      • Re: [OBORONA-SPAM] Re: [patch] row::operator[] - template versionUnknown Sender19 Sep
        • Re: [OBORONA-SPAM] Re: [patch] row::operator[] - template versionChris Frey19 Sep
          • Re: [patch] row::operator[] - template versionUnknown Sender19 Sep
            • Re: [patch] row::operator[] - template versionChris Frey19 Sep
            • Re: [patch] row::operator[] - template versionWarren Young19 Sep
        • Re: [patch] row::operator[] - template versionWarren Young19 Sep
    • Re: [patch] row::operator[] - template versionChris Frey18 Sep
  • Re: [patch] row::operator[] - template versionWarren Young19 Sep