From: tho Date: Thu, 21 Jul 2011 16:11:35 +0000 (+0000) Subject: Packets: fix for natty: Ensure correct linking of all referenced packet types (see... X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=dd369f242c6a7babc8d955b9220a4fcf5b9f2a38;p=senf.git Packets: fix for natty: Ensure correct linking of all referenced packet types (see Rev #674) (maybe g0dil knows a smarter way) git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1800 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Packets/PacketInterpreter.cti b/senf/Packets/PacketInterpreter.cti index 4c4a18e..469d617 100644 --- a/senf/Packets/PacketInterpreter.cti +++ b/senf/Packets/PacketInterpreter.cti @@ -43,14 +43,16 @@ template prefix_ bool senf::PacketInterpreterBase::is() { - { static void const * const _ ((void*)&Type::dump); (void) _; } + // ensure that the template argument is included in the corresponding object file when linking: + { static typename PacketInterpreter::factory_t _ (PacketInterpreter::factory()); (void) _;} return dynamic_cast< PacketInterpreter* >(this); } template prefix_ typename senf::PacketInterpreter::ptr senf::PacketInterpreterBase::as() { - { static void const * const _ ((void*)&Type::dump); (void) _; } + // ensure that the template argument is included in the corresponding object file when linking: + { static typename PacketInterpreter::factory_t _ (PacketInterpreter::factory()); (void) _;} return typename PacketInterpreter::ptr( static_cast< PacketInterpreter* >(this)); }