From: dan marsden (danmarsden_at_[hidden])
Date: 2006-05-04 13:27:10
> Larry Evans wrote:
> On 05/03/2006 01:54 PM, dan marsden wrote:
> >>In boost/fusion/tuple/tuple.hpp there's this:
> >>I don't see any use of the at_meta typedef. What's the
> >>purpose of this typedef?
> > This appears to be the result of a bit of cut and paste from the at and at_c implementations, which
> > also have the redundant typedef. The get implementations should be calling at_c directly, rather than
> > implementing more tag_dispatching to the at_impl type themselves. I've tidied things up, removing the
> > redundant typedefs in both get and at, and modifying get to call at_c directly.
> Could you post the location of the revised code?
Its under the spirit parser library cvs:
On the branch FUSION_V2
> There may be a similar cut and paste problem in
> /sequence/intrinsic/begin.hpp which has:
> template <typename Sequence>
> inline typename result_of::begin<Sequence>::type
> begin(Sequence& seq)
> typedef result_of::begin<Sequence> begin_meta;
> return extension::begin_impl
> <typename traits::tag_of<Sequence>::type>::
> template apply<Sequence>::call(seq);
You seem to have hit a bit of a rich seam here! I suspect this may recur in some
of the other intrinsics, I'll do a pass through and tidy this up. We may need to do a
bit of work on these anyway based on the MPL style comments made by Dave A about
calling the _impl functions.
> Also, the docs in notes.html under "Tag Dispatching" at the 2nd
> item 3 has:
> 3. result_of::begin is the template which is specialized to provide
> an implementation for each tag type
> yet, in the above begin.hpp, it's not specialized, and a grep of all the
> .hpp file turned up no likely candidates; however, a grep for
> 'struct begin_impl' did show several specializations. Is
> the aforementioned correct?
Yes, that is another typo, the correct structure is metafunction XXX
tag dispatching to implementation XXX_impl. Now fixed.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk