map_.insert(key, new detail::GenericTLVParserRegistry_Entry<BaseParser, Parser>() );
}
+// 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 <class BaseParser, class Keytype>
prefix_ void senf::GenericTLVParserRegistry<BaseParser,Keytype>::dump(
GenericTLVParser const & parser, std::ostream & os)
{
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 <class BaseParser, class Keytype>
{
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 <class BaseParser, class Keytype>
{
typename Map::const_iterator i (map_.find( parser.type()));
if (i != map_.end())
- return (i->second)->bytes(parser);
+ return PTRMAP_GET_CONTENTS(*i).bytes(parser);
else
throw TLVParserNotRegisteredException();
}
{
typename Map::const_iterator i (map_.find( key));
if (i != map_.end())
- return (i->second)->bytes(parser);
+ return PTRMAP_GET_CONTENTS(*i).bytes(parser);
else
throw TLVParserNotRegisteredException();
}
-
+#undef PTRMAP_GET_CONTENTS
///////////////////////////////ct.e////////////////////////////////////////
#undef prefix_