#51 a tiny blitz/func.h fix

open
nobody
None
5
2013-05-21
2013-02-04
Sylwester Arabas
No

As mentioned on the mailing list, the following code:

include <blitz/array.h>
inline double p(double x) { return 2 * x; }
BZ_DECLARE_FUNCTION(p)
int main() { }

does not compile on g++ and clang++ without the following change:

105c105
< typedef typename ifthenelse<coerce_int,typename ifthenelse<numeric_limits<T_numtype1>::is_integer,double,T_numtype1>::Type,T_numtype1>::Type
T_numtype; \ ---
> typedef typename BZ_BLITZ_SCOPE(ifthenelse)<coerce_int,typename BZ_BLITZ_SCOPE(ifthenelse)<BZ_STD_SCOPE(numeric_limits)<T_numtype1>::is_integer,double,T_numtype1>::Type,T_numtype1>::Type T_numtype; \

HTH,
Sylwester

Discussion

  • ping :)