|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2005-07-08 14:50:46
Douglas Gregor <doug.gregor_at_[hidden]> writes:
> On Jul 8, 2005, at 1:51 AM, David Abrahams wrote:
>
>>
>> I'm trying to come up with an example function to use in the tutorial
>> for the parameters library. The function would ideally:
>>
>> * have four or fewer parameters, most of which have defaults.
>>
>> * have at least one defaulted parameter whose type would normally be a
>> deduced function template parameter (when the argument is passed
>> explicitly)
>>
>> * have a parameter whose default depends on the value of another
>> parameter
>>
>> * have at least one parameter whose default value is of nontrivial
>> complexity to compute (so I can demonstrate lazy defaults).
>>
>> * be realistic
>>
>> Any ideas would be most welcome.
>
> depth_first_search(graph, visitor, color_map, index_map)
>
> visitor has a simple default (dfs_visitor<>())
>
> index_map has a nontrivial default of get(vertex_index, graph)
>
> color_map has a nontrivial default of:
> vector_property_map<color_type, typeof(index_map)>
I'll try that one and see how it comes out.
Thanks!
P.S. I thought you had converted Boost.Graph to use Boost.Parameter,
but I can't find any such code now (?)
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk