// Custom includes
#include <sstream>
+#include <boost/static_assert.hpp>
#include "Packets.hh"
#include "../Utils/auto_unit_test.hh"
struct ComplexEmptyAnnotation : senf::ComplexAnnotation
{};
+ struct InvalidAnnotation
+ {
+ std::string value;
+ };
+
}
BOOST_AUTO_UNIT_TEST(packet)
BOOST_CHECK( ! senf::detail::AnnotationIndexer<ComplexEmptyAnnotation>::Small );
}
+#ifdef COMPILE_CHECK
+
+COMPILE_FAIL(invalidAnnotation)
+{
+#if 0 // The traits check fails for user defined but trivial constructors so ...
+# ifdef BOOST_HAS_TYPE_TRAITS_INTRINSICS
+
+ senf::Packet packet (FooPacket::create());
+ (void) packet.annotation<InvalidAnnotation>();
+
+# else
+# endif
+#endif
+
+ invalid_annotation_check_disabled();
+
+}
+
+#endif
+
///////////////////////////////cc.e////////////////////////////////////////
#undef prefix_