Hi, lets say i have two arbitary container of any stl type. <br><br>template<br>&lt;<br>class T,<br>template &lt;typename ELEM, typename = std::allocator&lt;ELEM&gt; &gt;<br>class CONT<br>&gt;<br>typename boost::enable_if&lt;boost::is_floating_point&lt;T&gt;, T&gt;::type
<br>getManhattanDistance(const CONT&lt;T&gt;&amp; ObjectX, const CONT&lt;T&gt;&amp; ObjectY)<br><br>I want to be able to iterate through both containers to get the euclidean distance.. i.e. <br><br>sqrt of sum of each item in ObjectX&nbsp; - ObjectY square. 
<br><br>Psuedocode looks like this.. <br>/***********************************************<br>*&nbsp;&nbsp; getManhattanDistance(ObjectX, ObjectY)&nbsp;&nbsp;&nbsp;&nbsp; *<br>*&nbsp;&nbsp; overAllSum &lt;-- 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<br>*&nbsp;&nbsp; for i &lt;-- 0 to sizeof (ObjectX)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *
<br>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Xn &lt;-- ObjectX[i]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<br>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yn &lt;-- ObjectY[i]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<br>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; difference &lt;-- (Xn - Yn) * -1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<br>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; overAllSum &lt;-- overAllSum + difference *<br>
***********************************************/<br><br>but i want to make it as abstract (allowing nonindexable containers) but also clear as possible without losing speed. Whats the best way to do this using boost library. 
<br><br><br>