From: g0dil Date: Mon, 16 Oct 2006 10:56:04 +0000 (+0000) Subject: Fixes for g++-4 X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=c257a57f7c0af972d3abc60eaa0b75d303324928;p=senf.git Fixes for g++-4 git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@141 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Packets/PacketRegistry.ih b/Packets/PacketRegistry.ih index 2a752b2..f014506 100644 --- a/Packets/PacketRegistry.ih +++ b/Packets/PacketRegistry.ih @@ -35,6 +35,7 @@ namespace pkf { namespace impl { struct PkReg_Entry { + virtual ~PkReg_Entry() {} virtual void registerInterpreter(Packet const * p, Packet::iterator b, Packet::iterator e) = 0; virtual Packet::ptr reinterpret(Packet * p) = 0; diff --git a/Packets/ParserBase.ih b/Packets/ParserBase.ih index 3cb5eb1..924189a 100644 --- a/Packets/ParserBase.ih +++ b/Packets/ParserBase.ih @@ -45,11 +45,11 @@ namespace impl { Parser_traits_fixed_size_check(&Parser::bytes))-sizeof(Parser_traits_sentinel<1>); }; - template - Parser_traits_sentinel<2> Parser_traits_fixed_size_check(T); + template + Parser_traits_sentinel<2> Parser_traits_fixed_size_check(R (*)()); template - Parser_traits_sentinel<1> Parser_traits_fixed_size_check(R (T::*)()); + Parser_traits_sentinel<1> Parser_traits_fixed_size_check(R (T::*)() const); template bool check(Iterator const & b, Iterator const & e, ParserBase *); diff --git a/Packets/ParserBase.test.cc b/Packets/ParserBase.test.cc index dca6b77..b1a8983 100644 --- a/Packets/ParserBase.test.cc +++ b/Packets/ParserBase.test.cc @@ -28,6 +28,7 @@ // Custom includes #include "ParserBase.hh" #include "Packet.hh" +#include #include #include @@ -85,6 +86,9 @@ namespace { BOOST_AUTO_UNIT_TEST(parserBase_construction) { + BOOST_STATIC_ASSERT( pkf::Parser_traits< Parse_Test<> >::fixed_size ); + BOOST_STATIC_ASSERT( ! pkf::Parser_traits< Parse_Test2<> >::fixed_size ); + BOOST_CHECK_EQUAL( pkf::min_bytes< Parse_Test >(), 14u ); BOOST_CHECK( pkf::check< Parse_Test >(0,14) ); BOOST_CHECK( ! pkf::check< Parse_Test >(2,15) ); diff --git a/Packets/typeidvalue.hh b/Packets/typeidvalue.hh index 425c14f..bb03dbe 100644 --- a/Packets/typeidvalue.hh +++ b/Packets/typeidvalue.hh @@ -68,6 +68,7 @@ namespace lib { template TypeIdValue(Type *); struct Value { + virtual ~Value() {} virtual std::type_info const & id() = 0; virtual Value * clone() = 0; };