Files
2025-10-25 03:02:53 +03:00

1.4 KiB

[ios.base.callback]

31 Input/output library [input.output]

31.5 Iostreams base classes [iostreams.base]

31.5.2 Class ios_base [ios.base]

31.5.2.7 Callbacks [ios.base.callback]

🔗

void register_callback(event_callback fn, int idx);

1

#

Preconditions: The functionfn does not throw exceptions.

2

#

Effects: Registers the pair(fn, idx) such that during calls toimbue() ([ios.base.locales]),copyfmt(), or~ios_base() ([ios.base.cons]), the functionfn is called with argumentidx.

Functions registered are called when an event occurs, in opposite order of registration.

Functions registered while a callback function is active are not called until the next event.

3

#

Remarks: Identical pairs are not merged.

A function registered twice will be called twice.