Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/bug-872401 into lp:zorba.
Requested reviews: Matthias Brantner (matthias-brantner) For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-872401/+merge/79014 Replaced is_double and is_float by is_same. -- https://code.launchpad.net/~paul-lucas/zorba/bug-872401/+merge/79014 Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/util/stl_util.h' --- src/util/stl_util.h 2011-08-27 14:57:52 +0000 +++ src/util/stl_util.h 2011-10-11 18:01:28 +0000 @@ -198,26 +198,6 @@ /////////////////////////////////////////////////////////////////////////////// -template<typename T> -struct is_double { - static bool const value = false; -}; - -template<> -struct is_double<double> { - static bool const value = true; -}; - -template<typename T> -struct is_float { - static bool const value = false; -}; - -template<> -struct is_float<float> { - static bool const value = true; -}; - template<typename NumericType> inline typename std::enable_if<ZORBA_TR1_NS::is_signed<NumericType>::value,bool>::type ge0( NumericType n ) { === modified file 'src/util/string_util.h' --- src/util/string_util.h 2011-08-23 13:49:38 +0000 +++ src/util/string_util.h 2011-10-11 18:01:28 +0000 @@ -510,7 +510,8 @@ * @throws range_error if the number overflows/underflows. */ template<typename NumericType> inline -typename std::enable_if<is_double<NumericType>::value,NumericType>::type +typename std::enable_if<ZORBA_TR1_NS::is_same<NumericType,double>::value, + NumericType>::type aton( char const *s ) { return atod( s ); } @@ -527,7 +528,8 @@ * @throws range_error if the number overflows/underflows. */ template<typename NumericType> inline -typename std::enable_if<is_float<NumericType>::value,NumericType>::type +typename std::enable_if<ZORBA_TR1_NS::is_same<NumericType,float>::value, + NumericType>::type aton( char const *s ) { return atof( s ); }
-- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp