diff --git a/develop/doc/html/_sources/design/dynamic_image.rst.txt b/develop/doc/html/_sources/design/dynamic_image.rst.txt
index f43c5eaff..546bfa4d9 100644
--- a/develop/doc/html/_sources/design/dynamic_image.rst.txt
+++ b/develop/doc/html/_sources/design/dynamic_image.rst.txt
@@ -103,7 +103,7 @@ GIL ``any_image_view`` and ``any_image`` are subclasses of ``variant``:
y_coord_t height() const;
};
-Operations are invoked on variants via ``apply_operation`` passing a
+Operations are invoked on variants via ``variant2::visit`` passing a
function object to perform the operation. The code for every allowed
type in the variant is instantiated and the appropriate instantiation
is selected via a switch statement. Since image view algorithms
@@ -129,7 +129,7 @@ pixels. There is no "any_pixel" or "any_pixel_iterator" in GIL. Such
constructs could be provided via the ``variant`` mechanism, but doing
so would result in inefficient algorithms, since the type resolution
would have to be performed per pixel. Image-level algorithms should be
-implemented via ``apply_operation``. That said, many common operations
+implemented via ``variant2::visit``. That said, many common operations
are shared between the static and dynamic types. In addition, all of
the image view transformations and many STL-like image view algorithms
have overloads operating on ``any_image_view``, as illustrated with
@@ -180,14 +180,13 @@ implemented:
template
typename dynamic_xy_step_type::type rotated180_view(const View& src) { ... }
- namespace detail
- {
+ namespace detail {
// the function, wrapped inside a function object
template struct rotated180_view_fn
{
typedef Result result_type;
template result_type operator()(const View& src) const
- {
+ {
return result_type(rotated180_view(src));
}
};
@@ -195,10 +194,11 @@ implemented:
// overloading of the function using variant. Takes and returns run-time bound view.
// The returned view has a dynamic step
- template inline // Models MPL Random Access Container of models of ImageViewConcept
- typename dynamic_xy_step_type >::type rotated180_view(const any_image_view& src)
+ template inline
+ typename dynamic_xy_step_type>::type rotated180_view(const any_image_view& src)
{
- return apply_operation(src,detail::rotated180_view_fn >::type>());
+ using result_view_t = typename dynamic_xy_step_type>::type;
+ return variant2::visit(detail::rotated180_view_fn(), src);
}
Variants should be used with caution (especially algorithms that take
diff --git a/develop/doc/html/_sources/tutorial/gradient.rst.txt b/develop/doc/html/_sources/tutorial/gradient.rst.txt
index bbcb931e1..cc59d22e3 100644
--- a/develop/doc/html/_sources/tutorial/gradient.rst.txt
+++ b/develop/doc/html/_sources/tutorial/gradient.rst.txt
@@ -870,22 +870,22 @@ source view:
};
The second step is to provide an overload of ``x_luminosity_gradient`` that
-takes image view variant and calls GIL's ``apply_operation`` passing it the
+takes image view variant and calls ``variant2::visit`` passing it the
function object:
.. code-block:: cpp
- template
- void x_luminosity_gradient(const any_image_view& src, const DstView& dst)
+ template
+ void x_luminosity_gradient(const any_image_view& src, const DstView& dst)
{
- apply_operation(src, x_gradient_obj(dst));
+ variant2::visit(x_gradient_obj(dst), src);
}
-``any_image_view`` is the image view variant. It is
-templated over ``SrcViews``, an enumeration of all possible view types
+``any_image_view`` is the image view variant. It is
+templated over ``SrcViews...``, an enumeration of all possible view types
the variant can take. ``src`` contains inside an index of the
currently instantiated type, as well as a block of memory containing
-the instance. ``apply_operation`` goes through a switch statement
+the instance. ``variant2::visit`` goes through a switch statement
over the index, each case of which casts the memory to the correct
view type and invokes the function object with it. Invoking an
algorithm on a variant has the overhead of one switch
diff --git a/develop/doc/html/design/basics.html b/develop/doc/html/design/basics.html
index 71b8c8bc9..5b519853f 100644
--- a/develop/doc/html/design/basics.html
+++ b/develop/doc/html/design/basics.html
@@ -114,7 +114,7 @@ read the sections in order.