Windows trunk not compiling

Bug #986016 reported by Rodolfo Ochoa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Critical
Unassigned

Bug Description

There is a bug on windows that gives the following error:

1>c:\dev\bug928987\src\util\stl_util.h(315): error C2995: 'std::enable_if<std::tr1::is_signed<_Ty>::value&&std::tr1::is_signed<N2>::value,bool>::type zorba::ztd::ge_min(N1,N2)' : function template has already been defined
1> c:\dev\bug928987\src\util\stl_util.h(306) : see declaration of 'zorba::ztd::ge_min'
1>c:\dev\bug928987\src\util\stl_util.h(329): error C2995: 'std::enable_if<std::tr1::is_unsigned<_Ty>::value&&std::tr1::is_signed<N2>::value,bool>::type zorba::ztd::ge_min(N1,N2)' : function template has already been defined
1> c:\dev\bug928987\src\util\stl_util.h(320) : see declaration of 'zorba::ztd::ge_min'
1>c:\dev\bug928987\src\util\stl_util.h(343): error C2995: 'std::enable_if<std::tr1::is_signed<_Ty>::value&&std::tr1::is_signed<N2>::value,bool>::type zorba::ztd::le_max(N1,N2)' : function template has already been defined
1> c:\dev\bug928987\src\util\stl_util.h(334) : see declaration of 'zorba::ztd::le_max'
1>c:\dev\bug928987\src\util\stl_util.h(357): error C2995: 'std::enable_if<std::tr1::is_unsigned<_Ty>::value&&std::tr1::is_signed<N2>::value,bool>::type zorba::ztd::le_max(N1,N2)' : function template has already been defined
1> c:\dev\bug928987\src\util\stl_util.h(348) : see declaration of 'zorba::ztd::le_max'

Related branches

Revision history for this message
Rodolfo Ochoa (rodolfo-ochoa) wrote :

The error is described here:
http://stackoverflow.com/questions/9285657/sfinae-differentiation-between-signed-and-unsigned

seems that is an error in the compiler, so the solution is a workaround until the compiler is fixed.

Changed in zorba:
status: New → In Progress
Changed in zorba:
importance: Undecided → Critical
milestone: none → 2.5
Revision history for this message
Paul J. Lucas (paul-lucas) wrote :

I'm still curious as to whether:

typename std::enable_if<ZORBA_TR1_NS::is_integral<N1>::value
                      && ZORBA_TR1_NS::is_unsigned<N1>::value
                      && ZORBA_TR1_NS::is_integral<N2>::value
                      && ZORBA_TR1_NS::is_unsigned<N2>::value,bool>::type

would work.

Changed in zorba:
status: In Progress → Fix Committed
Revision history for this message
Rodolfo Ochoa (rodolfo-ochoa) wrote :

I tried, didn't work with is_integral...

Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.