]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix clang (with its own libc++) build after 9865de7 (#661)
authorFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 9 Jun 2020 02:04:45 +0000 (02:04 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 10 Jun 2020 16:31:28 +0000 (16:31 +0000)
Compilers that check allocator/container value_type matching detected a
mismatch because multimap::value_type is _not_ std::pair<key,T> but
std::pair<const key,T>!

Symptoms (when compiling files that include src/PingData.h):

     Allocator::value_type must be same type as value_type

src/PingData.h

index a1fc8501fd2a42b45b948356f13843cfe648bd97..c52492542116ed73653180baede58cf270e951e4 100644 (file)
@@ -16,7 +16,7 @@
 class PeerSelector;
 class PeerSelectorPingMonitor;
 
-typedef std::pair<timeval, PeerSelector *> WaitingPeerSelector;
+typedef std::pair<const timeval, PeerSelector *> WaitingPeerSelector;
 /// waiting PeerSelector objects, ordered by their absolute deadlines
 typedef std::multimap<timeval, PeerSelector *, std::less<timeval>, PoolingAllocator<WaitingPeerSelector> > WaitingPeerSelectors;
 typedef WaitingPeerSelectors::iterator WaitingPeerSelectorPosition;