Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

math: improve diag_value constructors #77228

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/math_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ constexpr void _validate_operand( thingie const &thing, std::string_view symbol

void _validate_unused_kwargs( diag_kwargs const &kwargs )
{
for( diag_kwargs::value_type const &v : kwargs ) {
for( diag_kwargs::impl_t::value_type const &v : kwargs.kwargs ) {
if( !v.second.was_used() ) {
throw std::invalid_argument( string_format( R"(Unused kwarg "%s")", v.first ) );
}
Expand Down Expand Up @@ -601,7 +601,7 @@ void math_exp::math_exp_impl::new_func()
"All positional arguments must precede keyword-value pairs" );
}
kwarg &kw = std::get<kwarg>( output.top().data );
kwargs.emplace( kw.key, _get_diag_value( *kw.val ) );
kwargs.kwargs.emplace( kw.key, _get_diag_value( *kw.val ) );
output.pop();
}
for( std::vector<thingie>::size_type i = 0; i < nparams; i++ ) {
Expand Down
Loading
Loading