From 41cf9e032442ce8b38395b2bc26b09d3189ffda2 Mon Sep 17 00:00:00 2001 From: rich_sposato Date: Mon, 3 Oct 2011 04:00:22 +0000 Subject: [PATCH] Minor changes for Visual Studio. git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1128 7ec92016-0320-0410-acc4-a06ded1c099a --- include/loki/AssocVector.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/loki/AssocVector.h b/include/loki/AssocVector.h index 230cb01..707a56b 100644 --- a/include/loki/AssocVector.h +++ b/include/loki/AssocVector.h @@ -153,8 +153,9 @@ namespace Loki typedef ::std::map< K, V, C, A > TempMap; typedef ::std::back_insert_iterator< Base > MyInserter; MyCompare & me = *this; - // Make a temporary map similar to this type to prevent any duplicates elements. - TempMap temp( first, last, me, alloc ); + const A tempAlloc; + // Make a temporary map similar to this type to prevent any duplicate elements. + TempMap temp( first, last, me, tempAlloc ); Base::reserve( temp.size() ); BaseType & target = static_cast< BaseType & >( *this ); MyInserter myInserter = ::std::back_inserter( target );