X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FPacketImpl.hh;h=32ae5a17a0b79eda12fde332d4fe72c231f22bed;hb=92f8630b75f3ef50e73c48cde58645dcd1534e27;hp=4b13fdd31704b3ca53a6010751252bea945f3790;hpb=3593676775cfadb0094eb4f472c6ced0763e0068;p=senf.git diff --git a/Packets/PacketImpl.hh b/Packets/PacketImpl.hh index 4b13fdd..32ae5a1 100644 --- a/Packets/PacketImpl.hh +++ b/Packets/PacketImpl.hh @@ -23,14 +23,16 @@ /** \file \brief PacketImpl public header */ -#ifndef HH_PacketImpl_ -#define HH_PacketImpl_ 1 +#ifndef HH_SENF_Packets_PacketImpl_ +#define HH_SENF_Packets_PacketImpl_ 1 // Custom includes #include #include #include #include +#include +#include #include #include "../Utils/pool_alloc_mixin.hh" #include "PacketTypes.hh" @@ -95,11 +97,15 @@ namespace detail { static bool const Complex = boost::is_base_of::value; static bool const Small = (sizeof(Annotation) <= sizeof(AnnotationEntry) && ! Complex); +# if 0 // The test is difficult since it does not work with user-defined trivial constructors # ifdef BOOST_HAS_TYPE_TRAITS_INTRINSICS - BOOST_STATIC_ASSERT(( boost::is_pod::value || Complex )); + BOOST_STATIC_ASSERT(( (boost::has_trivial_constructor::value + && boost::has_trivial_destructor::value) + || Complex )); # endif +# endif }; template ::Small> @@ -179,6 +185,9 @@ namespace detail { void erase(PacketData * self, iterator first, iterator last); void clear(PacketData * self); + void reserve(size_type n); + size_type capacity() const; + // Annotations template Annotation & annotation(); @@ -213,8 +222,8 @@ namespace detail { ///////////////////////////////hh.e//////////////////////////////////////// #endif -#if !defined(HH_Packets__decls_) && !defined(HH_PacketImpl_i_) -#define HH_PacketImpl_i_ +#if !defined(HH_SENF_Packets_Packets__decls_) && !defined(HH_SENF_Packets_PacketImpl_i_) +#define HH_SENF_Packets_PacketImpl_i_ #include "PacketImpl.cci" //#include "PacketImpl.ct" #include "PacketImpl.cti"