Skip to content

Commit

Permalink
fix: add make_field_function (#266)
Browse files Browse the repository at this point in the history
## Description
The `make_field_function` was removed in a previous version, but it is
used in external projects. This PR simply adds it back.

## Code of Conduct
By submitting this PR, you agree to follow our [Code of
Conduct](https://github.com/hpc-maths/samurai/blob/master/docs/CODE_OF_CONDUCT.md)
- [x] I agree to follow this project's Code of Conduct
  • Loading branch information
gouarin authored Feb 6, 2025
1 parent b96e70e commit 057bfbe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/samurai/field_expression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ namespace samurai
, m_f(std::forward<Func>(f))
{
}

template <class F, class... E>
inline auto make_field_function(E&&... e) noexcept
{
using type = field_function<F, E...>;
return type(F(), std::forward<E>(e)...);
}
} // namespace samurai

namespace xt::detail
Expand Down

0 comments on commit 057bfbe

Please sign in to comment.