Skip to content

Commit

Permalink
Resolve superfluous warning from MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Jun 29, 2022
1 parent ffc08ad commit 464d866
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/tao/pegtl/contrib/parse_tree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ namespace TAO_PEGTL_NAMESPACE::parse_tree
}

template< typename ParseInput, typename... States >
static void unwind( const ParseInput& in, state< Node >& state, States&&... st )
static void unwind( [[maybe_unused]] const ParseInput& in, [[maybe_unused]] state< Node >& state, States&&... st )
{
if constexpr( node_has_unwind< Node, Rule, void, const ParseInput&, States... > ) {
state.back()->template unwind< Rule >( in, st... );
Expand All @@ -325,6 +325,10 @@ namespace TAO_PEGTL_NAMESPACE::parse_tree
if constexpr( control_has_unwind< Control< Rule >, const ParseInput&, States... > ) {
Control< Rule >::unwind( in, st... );
}
#if defined( _MSC_VER )
( (void)st,
... );
#endif
}
};

Expand Down

0 comments on commit 464d866

Please sign in to comment.