diff --git a/src/lib/format-string.cpp b/src/lib/format-string.cpp index c0e84fad1..56fab4a96 100644 --- a/src/lib/format-string.cpp +++ b/src/lib/format-string.cpp @@ -48,6 +48,7 @@ #include "lib/error.hpp" #include "lib/format-string.hpp" +#include #include #include @@ -66,6 +67,8 @@ namespace util { /** */ _Fmt::_Fmt (string formatString) { + BOOST_STATIC_ASSERT (sizeof(boost::format) <= FORMATTER_SIZE); + UNIMPLEMENTED ("create the embedded boost::format object"); } diff --git a/src/lib/meta/size-trait.hpp b/src/lib/meta/size-trait.hpp index 7d615d55a..1abbb046b 100644 --- a/src/lib/meta/size-trait.hpp +++ b/src/lib/meta/size-trait.hpp @@ -64,6 +64,7 @@ namespace meta { //-------------------------------------mimicked-definitions-- typedef std::vector Vector; + typedef std::vector BVector; struct CompatAllocator : std::allocator @@ -102,6 +103,8 @@ namespace meta { char * _M_out_end; Locale _M_buf_locale; + + virtual ~BasicStringbuf() { } }; struct BasicAltstringbuf @@ -115,12 +118,12 @@ namespace meta { struct BoostFormat { - Vector items_; - Vector bound_; - int style_; - int cur_arg_; - int num_args_; - bool dumped_; + Vector items_; + BVector bound_; // note: differs in size + int style_; + int cur_arg_; + int num_args_; + mutable bool dumped_; std::string prefix_; unsigned char exceptions; BasicAltstringbuf buf_; @@ -131,9 +134,11 @@ namespace meta { public:/* ===== Interface: size constants ===== */ - enum { - STRING = sizeof(std::string) - , VECTOR = sizeof(std::vector) + enum { ALIGNMENT = sizeof(size_t) + + , STRING = sizeof(std::string) + , VECTOR = sizeof(Vector) + , BVECTOR = sizeof(BVector) , BOOST_FORMAT = sizeof(BoostFormat) };