Thanks, Andrew :)<br />That's a good possible solution, if I want a totally-generic algorithm.<br />I was considering doing something simmilar at design time, but finally my design decission was not to be "so" generic<br />and impose the use of bundled properties. I give default struct templates for those bundled properties,<br />but I don't want to impose using that default implementation. So, for a graph accomplishing my preconditions,<br />it should always be possible to use the expression g[v].min, but if I use the expression g[v] I don't know the type of the object it returns.<br />If there isn't any way to find out that, I'll have no other option than choosing between your totally-generic solution or<br />to be still more restrictive and impose using my default implementation of the bundled properties the graph must have.<br />I don't know if I'm being able to say correctly what I mean (English isn't my native language).<br />Cheers,<br /><br />Juan<br /><br />> Since<br />> your algorithm is generic, you should be thinking about how to "generically"<br />> get the properties of the graph. You can do this by abstracting the property<br />> reference as a function call. Instead of, g[v].min, you should be writing:<br />> vertex_min(g). Or whatever 'min' actually means in this case.<br />> <br />> What you're doing is effectively defining application-specific semantics for<br />> a graph (that vertices have a min property). In order for a graph to model<br />> that property, you just have to provide an overload specific to your graph<br />> type.<br />> <br />> Andrew Sutton<br />> andrew.n.sutton@gmail.com<br />> _______________________________________________<br />> Boost-users mailing list<br />> Boost-users@lists.boost.org<br />> http://lists.boost.org/mailman/listinfo.cgi/boost-users