From c32d594d64c83780bd6b4a70bb5c19013ff8536a Mon Sep 17 00:00:00 2001 From: Zach Laine Date: Sun, 12 Oct 2025 20:00:05 -0500 Subject: [PATCH] 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. --- include/boost/parser/concepts.hpp | 2 +- include/boost/parser/parser.hpp | 8 ++++---- include/boost/parser/parser_fwd.hpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/boost/parser/concepts.hpp b/include/boost/parser/concepts.hpp index 5f7295c0..296ca92f 100644 --- a/include/boost/parser/concepts.hpp +++ b/include/boost/parser/concepts.hpp @@ -59,7 +59,7 @@ namespace boost { namespace parser { std::declval(), std::declval(), std::declval(), - std::declval(), + std::declval(), std::declval(), std::declval())); diff --git a/include/boost/parser/parser.hpp b/include/boost/parser/parser.hpp index c701ca49..31caa8cd 100644 --- a/include/boost/parser/parser.hpp +++ b/include/boost/parser/parser.hpp @@ -412,7 +412,7 @@ namespace boost { namespace parser { } }; - inline nope global_nope; + inline nope const global_nope; template 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( diff --git a/include/boost/parser/parser_fwd.hpp b/include/boost/parser/parser_fwd.hpp index 43c7eebb..44565e88 100644 --- a/include/boost/parser/parser_fwd.hpp +++ b/include/boost/parser/parser_fwd.hpp @@ -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;