sizeof my_type = sizeof my_type + core_lib::type_impl, but as I am hiding m_wrapped refs core_lib::type_impl size is incomplete ; trying to avoid pointers and dynamic alloc ; do I have to put a dummy stuff like char add_dummy_size[128] in an else target?
I would prefer not using opaque or forward decl and ptrs, as those types are used a lot and collection-able; it would be a lot of dyn alloc / realloc at runtime especially on copy, then fragmentation ; it would degrade performances ; it can run on an embedded env,
so then my question as core_lib::type_impl is already compiled ; is the linker would be able to solve the real-size of it?
yes thx, I could verify this way ; but still this is not a topic where there are clear answers and might be totally random according to the platform and the compiler ; construct by placement would require calling the dtor before dealloc ; I feel dirty 8-)
another option, would be to write a script that inlines all the deps headers into a single one, core_lib_deps.h but still need to do some parsing to remove all the local #include directives ; this is still an issue in cpp not being able to deliver stripped public headers ; a compiler/header/tool would be welcome ; it could emit a tag with a predefined keyword on the stripped header.