List:MySQL++« Previous MessageNext Message »
From:Steve Roberts Date:March 16 2005 6:02am
Subject:Minor patch to null.h
View as plain text  
Our organization changed OS version and compiler (from GCC 3.2.2 to GCC 3.2.3).  As part
of the move, the CM powers-that-be tightened the code requirements such that compiles
fail on any warning.  As a result, our code was choking on a line in null.h where the
operator () function of class null_type was not returning a value (throws
BadNullConversion as it should).  The included patch is what we used to fix the problem
in our little world.

This is against 1.7.26; we haven't updated yet.  However I just checked and the patch
should work against the latest code.

Anyway, here's the diff, humbly submitted...:

--- lib/null.h  2005-03-15 21:25:23.000000000 -0800
+++ lib/null.h.new       2005-03-15 21:25:09.000000000 -0800
@@ -11,7 +11,7 @@

 class null_type {
 public:
-  template <class Type> operator Type () {throw BadNullConversion();}
+  template <class Type> operator Type () {if (1) throw BadNullConversion();else
return Type();}
 };

 //:

Thread
Minor patch to null.hSteve Roberts16 Mar
  • Re: Minor patch to null.hWarren Young17 Mar