Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/pjl-misc into lp:zorba.
Commit message: "Fix" for building on Windows. Requested reviews: Paul J. Lucas (paul-lucas) For more details, see: https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/171593 "Fix" for building on Windows. -- https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/171593 Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/common/shared_types.h' --- src/common/shared_types.h 2013-05-02 03:58:17 +0000 +++ src/common/shared_types.h 2013-06-26 15:55:32 +0000 @@ -136,11 +136,11 @@ template<typename F> class FloatImpl; typedef FloatImpl<double> Double; typedef FloatImpl<float> Float; -class integer_traits; -class negative_traits; -class nonNegative_traits; -class nonPositive_traits; -class positive_traits; +struct integer_traits; +struct negative_traits; +struct nonNegative_traits; +struct nonPositive_traits; +struct positive_traits; template<class T> class IntegerImpl; typedef IntegerImpl<integer_traits> Integer; typedef IntegerImpl<negative_traits> NegativeInteger; === modified file 'src/zorbatypes/decimal.h' --- src/zorbatypes/decimal.h 2013-06-18 23:53:59 +0000 +++ src/zorbatypes/decimal.h 2013-06-26 15:55:32 +0000 @@ -132,9 +132,11 @@ Decimal& operator=( char const *s ); +#if 0 /* MSVC++ doesn't like this */ template<class StringType> typename std::enable_if<ZORBA_HAS_C_STR(StringType),Decimal&>::type operator=( StringType const &s ); +#endif Decimal& operator=( Double const &d ); Decimal& operator=( Float const &f ); @@ -332,11 +334,13 @@ return *this; } +#if 0 /* MSVC++ doesn't like this */ template<class StringType> inline typename std::enable_if<ZORBA_HAS_C_STR(StringType),Decimal&>::type Decimal::operator=( StringType const &s ) { return operator=( s.c_str() ); } +#endif ////////// arithmetic operators /////////////////////////////////////////////// === modified file 'src/zorbatypes/float.cpp' --- src/zorbatypes/float.cpp 2013-05-18 14:36:06 +0000 +++ src/zorbatypes/float.cpp 2013-06-26 15:55:32 +0000 @@ -154,22 +154,17 @@ parse( temp.c_str() ); } -#define ZORBA_INSTANTIATE(F,I) \ - template FloatImpl<F>::FloatImpl( I const& ) - - -ZORBA_INSTANTIATE(float,Integer); -ZORBA_INSTANTIATE(float,NegativeInteger); -ZORBA_INSTANTIATE(float,NonNegativeInteger); -ZORBA_INSTANTIATE(float,NonPositiveInteger); -ZORBA_INSTANTIATE(float,PositiveInteger); - -ZORBA_INSTANTIATE(double,Integer); -ZORBA_INSTANTIATE(double,NegativeInteger); -ZORBA_INSTANTIATE(double,NonNegativeInteger); -ZORBA_INSTANTIATE(double,NonPositiveInteger); -ZORBA_INSTANTIATE(double,PositiveInteger); -#undef ZORBA_INSTANTIATE +template FloatImpl<float>::FloatImpl( Integer const& ); +template FloatImpl<float>::FloatImpl( NegativeInteger const& ); +template FloatImpl<float>::FloatImpl( NonNegativeInteger const& ); +template FloatImpl<float>::FloatImpl( NonPositiveInteger const& ); +template FloatImpl<float>::FloatImpl( PositiveInteger const& ); + +template FloatImpl<double>::FloatImpl( Integer const& ); +template FloatImpl<double>::FloatImpl( NegativeInteger const& ); +template FloatImpl<double>::FloatImpl( NonNegativeInteger const& ); +template FloatImpl<double>::FloatImpl( NonPositiveInteger const& ); +template FloatImpl<double>::FloatImpl( PositiveInteger const& ); ////////// assignment operators /////////////////////////////////////////////// === modified file 'src/zorbatypes/float.h' --- src/zorbatypes/float.h 2013-06-18 23:53:59 +0000 +++ src/zorbatypes/float.h 2013-06-26 15:55:32 +0000 @@ -131,9 +131,11 @@ FloatImpl& operator=( char const *s ); +#if 0 /* MSVC++ doesn't like this */ template<class StringType> typename std::enable_if<ZORBA_HAS_C_STR(StringType),FloatImpl&>::type operator=( StringType const &s ); +#endif FloatImpl& operator=( Decimal const &d ); @@ -469,12 +471,14 @@ return *this; } +#if 0 /* MSVC++ doesn't like this */ template<typename F> template<class StringType> inline typename std::enable_if<ZORBA_HAS_C_STR(StringType),FloatImpl<F>&>::type FloatImpl<F>::operator=( StringType const &s ) { return operator=( s.c_str() ); } +#endif ////////// arithmetic operators /////////////////////////////////////////////// === modified file 'src/zorbatypes/numeric_types.h' --- src/zorbatypes/numeric_types.h 2013-05-01 15:36:17 +0000 +++ src/zorbatypes/numeric_types.h 2013-06-26 15:55:32 +0000 @@ -22,11 +22,11 @@ /////////////////////////////////////////////////////////////////////////////// -class integer_traits; -class negative_traits; -class nonNegative_traits; -class nonPositive_traits; -class positive_traits; +struct integer_traits; +struct negative_traits; +struct nonNegative_traits; +struct nonPositive_traits; +struct positive_traits; template<class T> class IntegerImpl; typedef IntegerImpl<integer_traits> Integer;
-- 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