Boost logo

Boost Users :

From: Robert Dailey (rcdailey_at_[hidden])
Date: 2008-03-26 14:03:21


On Wed, Mar 26, 2008 at 11:33 AM, Steven Watanabe <watanabesj_at_[hidden]>
wrote:

> AMDG
>
> Robert Dailey wrote:
> > Would you mind going over what exactly this is doing? I'm having a
> > hard time wrapping my head around it. The documentation isn't helping
> > much either, as I've never used these before and the descriptions are
> > very confusing.
> >
> > I also didn't see a version of mpl::transform that only took 1
> > template argument. Is this correct?
>
> You're right. I was in too much of a hurry before.
> Here's something that actually compiles.
>
> <snip>
> In Christ,
> Steven Watanabe
>

The term 'inherit' here does not refer to class inheritance obviously. It's
an unusual usage of the term to me. When you do inherit<empty_base,
WalkPacket> what exactly is that doing? Is it joining them in a list
container or something? What is the resulting type of
mpl::inherit_linearly::type? Is the result of mpl::inherit_linearly::type
implicitly constructible from an mpl::transform::type? I'm going to read
over the docs a few more times in the meantime to see if I can grasp this
concept. Also, I'm not seeing how you're filling in the 2 placeholders in
the signal_holder typedef.

Also, mpl::vector has a max size limit I'm sure. Right now we have a very
minimal set of packet types, but in the future we have to consider the
possibility that 100+ packet types will exist (the final number is
ultimately unknown). If this is true, I doubt mpl::vector would be usable
anymore since 100 seems too large for it. This makes me feel like I'm going
to have to resort to a completely template-less approach. I might have to
send a generic Packet object to all subscribers, which has a ::Get() method
that performs a static_cast<>() to the concrete type based on an ID.

The only reason I haven't decided to use your ideas so far (which are
extremely great by the way) is because of the limitations of the design. The
design imposes a limit on the number of packet types we can support, which
isn't acceptable given the requirements.

Thanks again for your help.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net