Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
Metaprogramming definitions to deal with dependency on implementation size and layout.
Sometimes we need to build our code based on very specific assumptions regarding the implementation data layout of library classes we rely on. Typically such happens when we're forced to work around limitations the library provider never intended to be relevant for any client. Which places us into the very unfortunate situation either to abandon some design concept we prefer to use for some other relevant reason, or to do something very evil and nasty (namely to rely on magic numbers, which may break silently when the library provider changes implementation).
While this situation can not be solved in principle, at least we may concentrate all these nasty dependencies in a single location. Moreover, we can deal with this situation by constructing our magic numbers at least in a systematic way, which allows us to intersperse static assertions to trigger an alarm when adjustments need to be made.
Definition in file size-trait.hpp.
#include <vector>
#include <string>
Classes | |
struct | SizeTrait::BasicAltstringbuf |
struct | SizeTrait::BasicStringbuf |
struct | SizeTrait::BoostFormat |
struct | SizeTrait::CompatAllocator |
struct | SizeTrait::Locale |
struct | SizeTrait::Optional< T > |
class | SizeTrait |
A collection of constants to describe the expected size of some known classes, without needing to include the respective headers. More... | |
Namespaces | |
lib | |
Implementation namespace for support and library code. | |
struct lib::meta::SizeTrait::BoostFormat |
Class Members | ||
---|---|---|
Vector | items_ | |
BVector | bound_ | |
int | style_ | |
int | cur_arg_ | |
int | num_args_ | |
bool | dumped_ | |
string | prefix_ | |
unsigned char | exceptions | |
BasicAltstringbuf | buf_ | |
Optional< Locale > | loc_ |
struct lib::meta::SizeTrait::Locale |