@Nat<br>What you have provided is the exact and final implementation I chose. I found no reason to pass the derived type to the base.<br><br>@Steven<br>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! :)<br> <br>You take care and thanks so much.<br><br><div class="gmail_quote">On Wed, Apr 2, 2008 at 9:54 AM, Nat Goodspeed <<a href="mailto:nat@lindenlab.com">nat@lindenlab.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div class="Ih2E3d">Steven Watanabe wrote:<br> ><br> > I was just thinking of moving the duplicated code into CRTPPacket<br> ><br> > template<class Derived, PacketID Id><br> > struct CRTPPacket : Packet {<br> > static const PacketID ID = Id;<br> > virtual PacketID getID() const { return(ID); }<br> > };<br> <br> </div>Does it even need to be CRTP?<br> <br> template<PacketID Id><br> struct IDPacket : Packet {<br> <div class="Ih2E3d"> static const PacketID ID = Id;<br> virtual PacketID getID() const { return(ID); }<br> };<br> <br> </div>Perhaps we're assuming other methods that would make use of Derived.<br> <div><div></div><div class="Wj3C7c">_______________________________________________<br> Boost-users mailing list<br> <a href="mailto:Boost-users@lists.boost.org">Boost-users@lists.boost.org</a><br> <a href="http://lists.boost.org/mailman/listinfo.cgi/boost-users" target="_blank">http://lists.boost.org/mailman/listinfo.cgi/boost-users</a><br> </div></div></blockquote></div><br>