summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2018-12-10 17:41:24 +0100
committerAkim Demaille <akim.demaille@gmail.com>2018-12-10 17:50:12 +0100
commit81dbd0d82e5812d620bc16184583df10b1738cee (patch)
tree731f5687017ccc320a290d9ab8d5b0155eb807c9 /doc
parentd657da9fb40e961401069c3767bb12902c2faec1 (diff)
downloadbison-81dbd0d82e5812d620bc16184583df10b1738cee.tar.gz
C++: support variadic emplace
Suggested by Askar Safin. http://lists.gnu.org/archive/html/bug-bison/2018-12/msg00006.html * data/variant.hh: Implement. * tests/types.at: Check. * doc/bison.texi: Document.
Diffstat (limited to 'doc')
-rw-r--r--doc/bison.texi17
1 files changed, 7 insertions, 10 deletions
diff --git a/doc/bison.texi b/doc/bison.texi
index 8a66236d..e20ae028 100644
--- a/doc/bison.texi
+++ b/doc/bison.texi
@@ -11088,20 +11088,17 @@ in midrule actions. It is mandatory to use typed midrule actions
(@pxref{Typed Midrule Actions}).
@deftypemethod {semantic_type} {T&} emplace<T> ()
-Initialize, but leave empty. Return a reference to where the actual value
-may be stored. Requires that the variant was not initialized yet.
+@deftypemethodx {semantic_type} {T&} emplace<T> (const T& @var{t})
+Available in C++98/C++03 only. Default construct/copy-construct from
+@var{t}. Return a reference to where the actual value may be stored.
+Requires that the variant was not initialized yet.
@end deftypemethod
-@deftypemethod {semantic_type} {T&} emplace<T> (const T& @var{t})
-Initialize, and copy-construct from @var{t}. Available in C++98/C++03 only.
+@deftypemethod {semantic_type} {T&} emplace<T, U> (U&&... @var{u})
+Available in C++11 and later only. Build a variant of type @code{T} from
+the variadic forwarding references @var{u...}.
@end deftypemethod
-@deftypemethod {semantic_type} {T&} emplace<T, U> (U&& @var{u})
-Build a variant of type @code{T} from the forwarding reference @var{u}.
-Available in C++11 and later only.
-@end deftypemethod
-
-
@strong{Warning}: We do not use Boost.Variant, for two reasons. First, it
appeared unacceptable to require Boost on the user's machine (i.e., the
machine on which the generated parser will be compiled, not the machine on