Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2006-05-04 06:31:00

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?

> Thanks for pointing this one out.

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);

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?

Boost list run by bdawes at, gregod at, cpdaniel at, john at