X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FGenericTLV.ct;h=2153937a970b946cfb69d315ac49f5359007ed2f;hb=dbacfefe277bd5a1ff81e4e75448e2789da27e1b;hp=e405ce70b4461d1cd4eea4ab539235eed97a2430;hpb=2f115c1368fe2bbd683ef4f806cf5b85166214a4;p=senf.git diff --git a/senf/Packets/GenericTLV.ct b/senf/Packets/GenericTLV.ct index e405ce7..2153937 100644 --- a/senf/Packets/GenericTLV.ct +++ b/senf/Packets/GenericTLV.ct @@ -102,6 +102,14 @@ prefix_ void senf::GenericTLVParserRegistry::registerParser( map_.insert(key, new detail::GenericTLVParserRegistry_Entry() ); } +// Wow ... this is stupid .. Boost 1.33 ptr_map API is broken ... + +#if BOOST_VERSION < 103400 +#define PTRMAP_GET_CONTENTS(v) (v) +#else +#define PTRMAP_GET_CONTENTS(v) (*(v).second) +#endif + template prefix_ void senf::GenericTLVParserRegistry::dump( GenericTLVParser const & parser, std::ostream & os) @@ -109,7 +117,7 @@ prefix_ void senf::GenericTLVParserRegistry::dump( { typename Map::const_iterator i (map_.find( parser.type())); if (i != map_.end()) - (i->second)->dump(parser, os); + PTRMAP_GET_CONTENTS(*i).dump(parser, os); } template @@ -119,7 +127,7 @@ prefix_ void senf::GenericTLVParserRegistry::dump( { typename Map::const_iterator i (map_.find( key)); if (i != map_.end()) - (i->second)->dump(parser, os); + PTRMAP_GET_CONTENTS(*i).dump(parser, os); } template @@ -129,7 +137,7 @@ prefix_ senf::PacketParserBase::size_type senf::GenericTLVParserRegistrysecond)->bytes(parser); + return PTRMAP_GET_CONTENTS(*i).bytes(parser); else throw TLVParserNotRegisteredException(); } @@ -141,12 +149,12 @@ prefix_ senf::PacketParserBase::size_type senf::GenericTLVParserRegistrysecond)->bytes(parser); + return PTRMAP_GET_CONTENTS(*i).bytes(parser); else throw TLVParserNotRegisteredException(); } - +#undef PTRMAP_GET_CONTENTS ///////////////////////////////ct.e//////////////////////////////////////// #undef prefix_