2
0
mirror of https://github.com/boostorg/parser.git synced 2026-01-19 04:22:13 +00:00

Eliminate double-instantiation of context templates (due to on a difference

between a nope and nope const GlobalState template arg) by using nope const by
default.

Fixes #250.
This commit is contained in:
Zach Laine
2025-10-12 20:00:05 -05:00
parent c674e94c3d
commit c32d594d64
3 changed files with 6 additions and 6 deletions

View File

@@ -59,7 +59,7 @@ namespace boost { namespace parser {
std::declval<bool &>(),
std::declval<int &>(),
std::declval<ErrorHandler const &>(),
std::declval<detail::nope &>(),
std::declval<detail::nope const &>(),
std::declval<detail::symbol_table_tries_t &>(),
std::declval<detail::pending_symbol_table_operations_t &>()));

View File

@@ -412,7 +412,7 @@ namespace boost { namespace parser {
}
};
inline nope global_nope;
inline nope const global_nope;
template<typename T>
using parser_interface_tag_expr =
@@ -433,7 +433,7 @@ namespace boost { namespace parser {
typename I,
typename S,
typename ErrorHandler,
typename GlobalState = nope,
typename GlobalState = nope const,
typename Callbacks = nope,
typename Attr = nope,
typename Val = nope,
@@ -747,7 +747,7 @@ namespace boost { namespace parser {
bool & success,
int & indent,
ErrorHandler const & error_handler,
nope & n,
nope const & n,
symbol_table_tries_t & symbol_table_tries,
pending_symbol_table_operations_t &
pending_symbol_table_operations) noexcept
@@ -1518,7 +1518,7 @@ namespace boost { namespace parser {
bool success = true;
int indent = 0;
rethrow_error_handler eh;
nope n;
nope const n;
symbol_table_tries_t symbol_table_tries;
pending_symbol_table_operations_t pending_symbol_table_operations;
auto const context = detail::make_context<false, false>(

View File

@@ -115,7 +115,7 @@ namespace boost { namespace parser {
bool & success,
int & indent,
ErrorHandler const & error_handler,
nope &,
nope const &,
symbol_table_tries_t & symbol_table_tries,
pending_symbol_table_operations_t &
pending_symbol_table_operations) noexcept;