Quick Links: |
Provide a way to force a link-time dependency into an object. More...
Defines | |
#define | BSLS_LINKCOERCION_FORCE_SYMBOL_DEPENDENCY(type,refName,referredSymbol) |
BSLS_LINKCOERCION_FORCE_SYMBOL_DEPENDENCY This macro forces a link-time dependency into an object.
s_coerce
of type const char *
: extern const char *s_coerce;
BSLS_LINKCOERCION_FORCE_SYMBOL_DEPENDENCY
to add a dependency on this symbol into any object which includes the header: BSLS_LINKCOERCION_FORCE_SYMBOL_DEPENDENCY(const char *, bsls_coerceexample_coerce, s_coerce)
.cpp
file, the s_coerce
symbol needs to be defined: const char *s_coerce = "Link me in!";