c++: use noexcept where appropriate

Reported by Don Macpherson.
https://github.com/akimd/bison/issues/63
https://github.com/akimd/bison/issues/64

* data/skeletons/c++.m4, data/skeletons/lalr1.cc: here.
This commit is contained in:
Akim Demaille
2020-12-02 21:38:43 +01:00
parent 1e0b087244
commit 89d2b69c1b
2 changed files with 6 additions and 6 deletions

View File

@@ -340,7 +340,7 @@ m4_define([b4_symbol_type_define],
}
/// Destroy contents, and record that is empty.
void clear ()
void clear () YY_NOEXCEPT
{]b4_variant_if([[
// User destructor.
symbol_kind_type yykind = this->kind ();
@@ -424,7 +424,7 @@ m4_define([b4_symbol_type_define],
by_kind (kind_type t);
/// Record that this symbol is empty.
void clear ();
void clear () YY_NOEXCEPT;
/// Steal the symbol kind from \a that.
void move (by_kind& that);
@@ -544,7 +544,7 @@ m4_define([b4_public_types_define],
{}
]b4_inline([$1])[void
]b4_parser_class[::by_kind::clear ()
]b4_parser_class[::by_kind::clear () YY_NOEXCEPT
{
kind_ = ]b4_symbol(-2, kind)[;
}