Hooks

Hooking events

Outcome provides multiple methods for user code to intercept various events which occur. The deepest method is simply to inherit from basic_result or basic_outcome, and override member functions, for which you will need to study the source code as that form of customisation is out of scope for this tutorial. Another option is to supply a custom NoValuePolicy which can get you surprisingly far into customisation (see preceding section). The final option, which this section covers, is to use the ADL discovered event hooks which tell you when a namespace-localised basic_outcome or basic_result has been: »