@Nat
What you have provided is the exact and final implementation I chose. I found no reason to pass the derived type to the base.

@Steven
I never took the time to say thank you. You've been absolutely wonderful, I really do appreciate all of the help you've given me. I almost feel like I should pay you... but don't get any smart ideas about that! :)

You take care and thanks so much.

On Wed, Apr 2, 2008 at 9:54 AM, Nat Goodspeed <nat@lindenlab.com> wrote:
Steven Watanabe wrote:
>
> I was just thinking of moving the duplicated code into CRTPPacket
>
> template<class Derived, PacketID Id>
> struct CRTPPacket : Packet {
>     static const PacketID ID = Id;
>     virtual PacketID getID() const { return(ID); }
> };

Does it even need to be CRTP?

template<PacketID Id>
struct IDPacket : Packet {
    static const PacketID ID = Id;
    virtual PacketID getID() const { return(ID); }
};

Perhaps we're assuming other methods that would make use of Derived.
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users