|
mdds
|
Base declaration with no implementation. A specialization provides an operator() which receives a source value and returns its clone, to enable cloning of a non-copyable element block storing values of that type.
By default, each block clone uses exactly one instance of this function object and applies it to the elements strictly in the same order as they are stored in the source. The operator() may therefore be non-const, to let the function object carry state across the elements of a block during cloning. The block is the default scope of that state; to widen it to several blocks or several containers, the caller passes its own instance to the clone() and detach() overloads that take clone_value instances.
If a specialization declares an optional exec_policy type, the values are cloned via std::transform with that execution policy instead; the order of cloning of the element values is unspecified and the function object may get copied, so the operator() must be const and the function object must be stateless.