|
Boost : |
From: Stjepan Rajko (stipe_at_[hidden])
Date: 2007-10-24 22:57:59
On 10/23/07, Douglas Gregor <dgregor_at_[hidden]> wrote:
> Stjepan Rajko wrote:
> > For my specializable functions, I adapted what is used in fusion, e.g.:
> >
> > [snip]
> >
> IIRC, using this form makes operation_impl<some_producer_tag,
> some_consumer_tag> into an MPL metafunction class, which makes it usable
> with all of the various metafunction algorithms. That's important if you
> need to use MPL algorithms across sequences of producer/consumer types.
Ahh, I see. I had no idea where this convention came from :-) I'll
have to think about how useful direct MPL interoperability is in the
dataflow lib...
> > [snip]
> >
> > , or the technique described in:
> > http://www.boost.org/more/generic_programming.html,
> >
> > or any other tag dispatching convention I should be aware of?
> >
> I still prefer the technique described at the web page you mention,
> because it's more robust with the evolution of the concepts in the
> library. For example, note in the advance() example there that we only
> [snip]
OK, I see... But then I suppose the tricky part becomes getting the
exact result type, if it's not fixed...
Doug, thank you very much for such a detailed response! Now I have
some thinking to do :-)
Stjepan
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk