@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.
Steven Watanabe wrote:Does it even need to be CRTP?
>
> 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); }
> };
template<PacketID Id>
struct IDPacket : Packet {
static const PacketID ID = Id;Perhaps we're assuming other methods that would make use of Derived.
virtual PacketID getID() const { return(ID); }
};
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users