Collection of template-heterogeneous types
<p>I have a bunch of <code>boost::property_map</code>s defining costs of edge traversal in a graph. I'm executing an algorithm with differently weighted combinations of these maps, currently by manually doing <code>totalcost = weight1*weight1_factor + weight2*weight2_factor + ...</code>. The number of property maps is rising though, and it's becoming a hassle to sum them up like this.</p>

<p>So, I envisioned creating an aggregation class, which contains a collection of some sort of all the maps. However, they are templated differently, as <code>boost::property_map&lt;Graph, PropertyTag&gt;</code>, where the <code>PropertyTag</code> differs among the maps. Since they all support <code>operator[](edge_escriptor)</code>, is there some trick I can use, or am I doomed to use <code>boost::any</code>?</p>
