diff --git a/doc/variant2/changelog.adoc b/doc/variant2/changelog.adoc index ee331f5..08f9a12 100644 --- a/doc/variant2/changelog.adoc +++ b/doc/variant2/changelog.adoc @@ -15,6 +15,7 @@ http://www.boost.org/LICENSE_1_0.txt * Added support for derived types in `visit` * Improved compilation performance for many (hundreds of) alternatives. +* Added support for `visit` ## Changes in 1.73.0 diff --git a/doc/variant2/reference.adoc b/doc/variant2/reference.adoc index 6398105..8aba92d 100644 --- a/doc/variant2/reference.adoc +++ b/doc/variant2/reference.adoc @@ -134,7 +134,7 @@ template // visit -template +template constexpr /*see below*/ visit(F&& f, V&&... v); // monostate @@ -838,7 +838,7 @@ Returns: :: ### visit ``` -template +template constexpr /*see below*/ visit(F&& f, V&&... v); ``` [none] @@ -846,6 +846,10 @@ template + Returns: :: `std::forward(f)(get(std::forward(v))...)`, where `I...` is `v.index()...`. +Remarks: :: If `R` is given explicitly, as in `visit`, the return + type is `R`. Otherwise, it's deduced from `F`. All possible applications + of `F` to the variant alternatives must have the same return type for + this deduction to succeed. ### swap