|
Boost Users : |
From: Robert Dailey (rcdailey_at_[hidden])
Date: 2008-04-02 11:38:20
@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_at_[hidden]> 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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
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