From 5011dd8e1cfad76b27a99899ee862d97de6f50ed Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 12 May 2019 00:13:38 +0300 Subject: [PATCH] Update html --- doc/html/variant2.html | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/doc/html/variant2.html b/doc/html/variant2.html index bec6d59..918dab2 100644 --- a/doc/html/variant2.html +++ b/doc/html/variant2.html @@ -445,7 +445,16 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
Table of Contents
+
+

Inspecting the Value

Putting values into a variant is easy, but taking them out is necessarily a bit more convoluted. It’s not possible for variant<int, float> to define a @@ -765,6 +785,9 @@ the following lines:

}
+ +
+

Visitation

Last but not least, there’s visit. visit(f, v) calls the a function object f with the value contained in the variant v and returns the result. When @@ -819,6 +842,9 @@ example:

f(x1, x2), where x1 is the value contained in v1 and x2 is the value in v2.

+
+
+

Default Construction

The default constructor of variant value-initializes the first type in the list. variant<int, float>{} holds 0 (of type int), and @@ -834,6 +860,7 @@ which is basically a no-op, as monostate is effectively an empty

+

Reference

@@ -2492,7 +2519,7 @@ the Boost Software License, Versi