X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FPacketInterpreter.cti;fp=senf%2FPackets%2FPacketInterpreter.cti;h=469d617919150cfa2cd3ed3bbfbb9c3cb1cdd07e;hb=dd369f242c6a7babc8d955b9220a4fcf5b9f2a38;hp=4c4a18e725c5d8870cc8e50441524f1e03d6974b;hpb=d506c3134c5c01272c01608c86b8285176b50226;p=senf.git 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)); }