![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
- template <class Type> operator Type () {throw BadNullConversion();} + template <class Type> operator Type () {if (1) throw BadNullConversion();else return Type();} |
#3
| |||
| |||
|
|
-----Original Message----- From: Warren Young [mailto:mysqlpp (AT) etr-usa (DOT) com]=20 Sent: Tuesday, April 05, 2005 5:15 AM To: MySQL++ Mailing List Subject: Re: Patch to fix compile error. =20 Kevin Regan wrote: - template <class Type> operator Type () {throw=20 BadNullConversion();} + template <class Type> operator Type () {if (1) throw=20 + BadNullConversion();else return Type();} =20 I rejected this once before, because it's UGLY. I'll accept: =20 template <class Type> operator Type () { throw BadNullConversion(); return Type(); } =20 ...if that fixes the warning. =20 Also, what compiler does this affect? =20 --=20 MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: =20 http://lists.mysql.com/plusplus?unsu...) f5 (DOT) com =20 =20 |
#4
| |||
| |||
|
|
g++ -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs |
|
- template <class Type> operator Type () {throw BadNullConversion();} + template <class Type> operator Type () {if (1) throw = BadNullConversion();else return Type();} |
#5
| |||
| |||
|
|
- template <class Type> operator Type () {throw BadNullConversion();} + template <class Type> operator Type () {if (1) throw = BadNullConversion();else return Type();} |
#6
| |||
| |||
|
|
This fixes the problem. |
![]() |
| Thread Tools | |
| Display Modes | |
| |