X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FPacketImpl.hh;h=667eebb151ec9e237711d89891ac433b4b6109a9;hb=7a5841bb928db440280cf91bbb3ea0230fd0e911;hp=4aa2d8c1f63065a5963c48fe893304743532f326;hpb=e4526bf485cbf7f35d26264cb2ede91efdd5c54f;p=senf.git diff --git a/Packets/PacketImpl.hh b/Packets/PacketImpl.hh index 4aa2d8c..667eebb 100644 --- a/Packets/PacketImpl.hh +++ b/Packets/PacketImpl.hh @@ -31,6 +31,9 @@ #include #include #include +#include +#include +#include #include "../Utils/pool_alloc_mixin.hh" #include "PacketTypes.hh" #include "../Utils/singleton.hh" @@ -91,8 +94,16 @@ namespace detail { AnnotationIndexer(); unsigned index_; static unsigned index(); - static bool const Small = (sizeof(Annotation) <= sizeof(AnnotationEntry) - && ! boost::is_base_of::value); + static bool const Complex = boost::is_base_of::value; + static bool const Small = (sizeof(Annotation) <= sizeof(AnnotationEntry) && ! Complex); + +# ifdef BOOST_HAS_TYPE_TRAITS_INTRINSICS + + BOOST_STATIC_ASSERT(( (boost::has_trivial_constructor::value + && boost::has_trivial_destructor::value) + || Complex )); + +# endif }; template ::Small>