Boost logo

Boost Users :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-03-29 20:06:34


AMDG

Robert Dailey wrote:
>
>
> struct WalkPacket : CRTPPacket<WalkPacket, PID_WALKPACKET> {}; ?
>
>
> What exactly is this structure supposed to present?

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

In Christ,
Steven Watanabe


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