Skip to content

Commit

Permalink
Adding case for void state to production_value_callback (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusVoelker authored Nov 8, 2023
1 parent d76ce0c commit 604a621
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/lexy/grammar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ class production_value_callback
template <typename... Args>
constexpr return_type operator()(Args&&... args) const
{
if constexpr (lexy::is_callback_with_state_for<_type, ParseState, Args&&...>)
if constexpr (lexy::is_callback_with_state_for<_type, ParseState, Args&&...>
&& !std::is_void_v<ParseState>)
{
return _get_value(_state)[*_state](LEXY_FWD(args)...);
}
Expand Down

0 comments on commit 604a621

Please sign in to comment.