template<typename T, typename S, size_t D = sizeof(T) / sizeof(S)>
struct stm::iccsync::CAS_ADAPTER< T, S, D >
We're really liberal with the types of the parameters that we pass to the sync builtins. Apparently, gcc is fine with this, and "does the
right thing" for them. Our SYNC interface, on the other hand, is really picky about type matching. This CAS_ADAPTER does the type matching that we need for our stm usage. This matches whenever T and S are different, and the value we're casting in may be smaller than the value we're casting to. This works because we've specialized for T == S, and for S > T.