Opened 6 years ago

Closed 5 years ago

#12956 closed Bugs (wontfix)

Already defined errors in VS2008 ARM because of enable_if_c

Reported by: Vyacheslav Lanovets <vyacheslav@…> Owned by: John Maddock
Milestone: To Be Determined Component: multiprecision
Version: Boost 1.63.0 Severity: Problem
Keywords: enable_if_c sfinae Cc:

Description

Solution:Use enable_if instead of enable_if_c where possible.

To see the problem, it's enough to include cpp_bin_float.hpp.

Win32 compiler in VS2008 sp1 compiles it normally. But ARMV4I clarm compiler in the same installation with Widows Mobile 6 SDK - does not. While there are many Windows CE systems out there, MS stopped producing compilers for it long time ago. Everybody is stuck with VS2008.

Use of "::value" as argument makes it optimistically bring the function into scope. And later it complaints about redefinition.

Replacing enable_if_c with enable_if wherever possible in cpp_bin_float.hpp apparently forces compiler to perform substitution, and it fails and SFINAE works.

(After the above is changed, clarm.exe incorrectly deduce SignType of eval_left_shift but it's a different investigation)

Change History (2)

comment:1 by John Maddock, 6 years ago

I'm somewhat loathed to make that change: I had a lot of problems getting msvc to handle the enable_if's and using enable_if_c by and large worked better across more versions. I'm fairly sure this would open a can of worms that would break a bunch of other stuff :(

comment:2 by John Maddock, 5 years ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.