C++ Bare Bones: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
m using std is usually wrong and having it here makes the code longer than code with qualified int types
mNo edit summary
Line 296:
 
==Questions==
;Does anyone know ifAre those '''.ctor'''s and '''.dtor'''s are compiler-specific to some compiler or ifis there's an ABI statingfor them?
:It's defined in the ELF ABI for System V platforms, but it's used by most Unices. The concept of using a constructor/destructor list for bootup is not so much specified by any C++ ABI, but it is used in most implementations.
 
;Does anyone know how to control the order of the static '''ctor'''s?
:The name mangling algorithm, combined with the "SORT" directive in the linker script, determine the order. Thanks to SORT, the order is deterministic and depends on the lexicographical order of class names. HoweverThis order doesn't necessarily coincide with source code order or programmer's intention, ithowever. isFor probablythis bestexact toreason, keepthey inter-dependenciesshould atbe anavoided at absoluteall minimumcosts.
 
==See Also==