Closed wyattoday closed 5 years ago
It's been available for x86 since at least Visual Studio 2015. So, perhaps modify the #ifdef to include that:
|| (BOOST_MSVC >= 1900 && defined(_M_IX86))
Also, as far as I can see for every MSVC that supports targeting ARM (32-bit arm), that intrinsic has been available. So, that part of the ifdef shouldn't have been chopped out.
Also, as far as I can see for every MSVC that supports targeting ARM (32-bit arm), that intrinsic has been available.
intrin.h in MSVC-10 contains checks for _M_ARM
but doesn't define _InterlockedCompareExchangePointer
for that platform.
Well, MSDN documentation doesn't explicitly say when they made it available, so I'd be happy with a VS 2015 check for both x86 / ARM:
|| (BOOST_MSVC >= 1900 && (defined(_M_IX86) || defined(_M_ARM)))
People using modern compilers will get the benefit of the intrinsics.
To be clear, there is no benefit from using pointer intrinsics compared to the properly sized integer intrinsics. I'll add compiler version checks, though.
I don't think this is correct wrt.
_M_ARM
and_M_IX86
. As I remember, at least some MSVC versions don't provide pointer intrinsics on 32-bit targets.