mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 01:03:04 +00:00
c++: prefer 'emplace' to 'build'
When we introduced variants in Bison, C++ did not have the 'emplace' functions, and we chose 'build'. Let's align with modern C++ and promote 'emplace' rather than 'build'. * data/lalr1.cc, data/variant.hh (emplace): New. (build): Deprecate in favor of emplace. * doc/bison.texi: Adjust.
This commit is contained in:
@@ -862,7 +862,7 @@ b4_dollar_popdef])[]dnl
|
||||
/* Variants are always initialized to an empty instance of the
|
||||
correct type. The default '$$ = $1' action is NOT applied
|
||||
when using variants. */
|
||||
b4_symbol_variant([[yyr1_@{yyn@}]], [yylhs.value], [build])], [
|
||||
b4_symbol_variant([[yyr1_@{yyn@}]], [yylhs.value], [emplace])], [
|
||||
/* If YYLEN is nonzero, implement the default value of the
|
||||
action: '$$ = $1'. Otherwise, use the top of the stack.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user