GCC-5 compatibility: need 1/3 more inline buffer space

GCC-5 requires more storage for some basic data types
Most notably std::string is now way larger than void*
This commit is contained in:
Fischlurch 2017-08-17 13:24:34 +02:00
parent ae2a9f0953
commit e46d23bd62
3 changed files with 9 additions and 3 deletions

View file

@ -75,6 +75,7 @@
#include <utility>
#include <type_traits>
#include <boost/noncopyable.hpp>
#include <boost/lexical_cast.hpp>
namespace lib {
@ -730,7 +731,9 @@ namespace lib {
{
if (sizeof(SUB) > maxSiz_)
throw error::Fatal("Unable to implant implementation object of size "
"exceeding the pre-established storage buffer capacity."
"exceeding the pre-established storage buffer capacity. "
+boost::lexical_cast<std::string>(sizeof(SUB)) + " > "
+boost::lexical_cast<std::string>(maxSiz_)
,error::LUMIERA_ERROR_CAPACITY);
using Holder = InPlaceBuffer<BA, sizeof(SUB)>;

View file

@ -175,8 +175,11 @@ namespace test{
cout << showSizeof<ForkID>() << endl;
cout << showSizeof<BareEntryID>() << endl;
cout << showSizeof<lumiera_uid>() << endl;
cout << showSizeof<string>() << endl;
cout << showSizeof<void*>() << endl;
CHECK (sizeof(ForkID) == sizeof(BareEntryID));
CHECK (sizeof(ForkID) == sizeof(lumiera_uid) + sizeof(void*));
CHECK (sizeof(ForkID) == sizeof(lumiera_uid) + sizeof(string));
}

View file

@ -272,7 +272,7 @@ namespace test{
friend constexpr size_t
treeMutatorSize (const Opaque*)
{
return 350;
return 430;
}
};