template <auto* Symbol>

struct Weak

Defined at line 59 of file ../../sdk/lib/c/threads/../dlfcn/../weak.h

This facilitates use of a hook interface that libc is a client of. Each

public symbol (function or variable) is declared as extern in some public or

quasi-public header shared with code that defines the symbol. Those public

declarations don't use [[gnu::weak]] because definers of the symbols should

not define them as weak. Instead, libc-private code that is going to use

such a symbol does:

```

extern [[gnu::weak]] decltype(__hook_name) __hook_name;

```

Then it can use `Weak

<

&

__hook_name>::...` to make use of the symbol, which

might or might not actually be defined at runtime. The `

&

` can be elided

for a function symbol, since they're implicitly converted to function

pointer the template parameter must be a pointer (to a named entity).

Public Members

static const WeakCall<Type, Symbol> Call

Records