]> git.ipfire.org Git - thirdparty/squid.git/commit
Fix ClpMap build error on arm32 (#844)
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 17 Jun 2021 05:07:57 +0000 (05:07 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Thu, 17 Jun 2021 15:46:01 +0000 (15:46 +0000)
commit1fba9abd39680bc9c2804dee42ae4fd75807819d
tree298abffd98ee3a798fbc59ff3336ea4dddb6d321
parent91ce75c92ab00d7f11d1876a549c2e1d9a547392
Fix ClpMap build error on arm32 (#844)

    static_assert ... "Sum() return type can fit its (unsigned) result"
    in ClpMap member instantiation inside sslCrtvdHandleReplyWrapper()

Honor Sum<T>() caller's explicit request to use a specific accumulation
type T instead of guessing the right type for inner sum iterations
(based on the second, third, etc. arguments) and hitting static
assertions when those guesses were wrong because some of those arguments
used types smaller than T.

This fix also allows Sum() callers to avoid explicit T when the first
argument is already the largest one. Callers should not be forced to be
explicit at all, but computing the largest type is a complex known TODO
outside this fix scope.
src/SquidMath.h