1<!-- Copyright 2018 Paul Fultz II 2 Distributed under the Boost Software License, Version 1.0. 3 (http://www.boost.org/LICENSE_1_0.txt) 4--> 5 6Definitions 7=========== 8 9Function Adaptor 10---------------- 11 12A [function adaptor](<Function Adaptor>) takes a function(or functions) and returns a new function with enhanced capability. Each adaptor has a functional form with a corresponding class with `_adaptor` appended to it: 13 14```cpp 15template<class... Fs> 16FunctionAdaptor_adaptor<Fs...> FunctionAdaptor(Fs...); 17``` 18 19Both the functional form and the class form can be used to construct the adaptor. 20 21Static Function Adaptor 22----------------------- 23 24A static function adaptor is a [function adaptor](<Function Adaptor>) that doesn't have a functional form. It is only a class. It has an additional requirement that the function is [`DefaultConstructible`](DefaultConstructible): 25 26```cpp 27template<class... Fs> 28class StaticFunctionAdaptor; 29``` 30 31Decorator 32--------- 33 34A decorator is a function that returns a [function adaptor](<Function Adaptor>). The [function adaptor](<Function Adaptor>) may be an unspecified or private type. 35 36```cpp 37template<class... Ts> 38FunctionAdaptor Decorator(Ts...); 39``` 40 41Semantics 42--------- 43 44Some parts of the documentation provides the meaning(or equivalence) of an expression. Here is a guide of those symbols: 45 46* `f`, `g`, `fs`, `gs`, `p` are functions 47* `x`, `y`, `xs`, `ys` are parameters to a function 48* `T` represents some type 49* `...` are parameter packs and represent varidiac parameters 50 51Signatures 52---------- 53 54All the functions are global function objects except where an explicit template parameter is required on older compilers. However, the documentation still shows the traditional signature since it is much clearer. So instead of writing this: 55 56```cpp 57struct if_f 58{ 59 template<class IntegralConstant> 60 constexpr auto operator()(IntegralConstant) const; 61}; 62const constexpr if_f if_ = {}; 63``` 64 65The direct function signature is written even though it is actually declared like above: 66 67```cpp 68template<class IntegralConstant> 69constexpr auto if_(IntegralConstant); 70``` 71 72Its usage is the same except it has the extra benefit that the function can be directly passed to another function. 73 74