Skip to content

Commit

Permalink
World: make helpers private
Browse files Browse the repository at this point in the history
  • Loading branch information
leissa committed Feb 11, 2025
1 parent c07d5f5 commit 1112786
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions include/mim/world.h
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,6 @@ class World {
// clang-format off
template<class Id, class... Args> const Def* call(Id id, Args&&... args) { return call_(annex(id), std::forward<Args>(args)...); }
template<class Id, class... Args> const Def* call( Args&&... args) { return call_(annex<Id>(), std::forward<Args>(args)...); }
template<class T, class... Args> const Def* call_(Ref callee, T arg, Args&&... args) { return call_(implicit_app(callee, arg), std::forward<Args>(args)...); }
template<class T> const Def* call_(Ref callee, T arg) { return implicit_app(callee, arg); }
// clang-format on
///@}

Expand Down Expand Up @@ -539,6 +537,15 @@ class World {
///@}

private:
/// @name call_
/// Helpers to unwind World::call with variadic templates.
///@{
template<class T, class... Args> const Def* call_(Ref callee, T arg, Args&&... args) {
return call_(implicit_app(callee, arg), std::forward<Args>(args)...);
}
template<class T> const Def* call_(Ref callee, T arg) { return implicit_app(callee, arg); }
///@}

/// @name Put into Sea of Nodes
///@{
template<class T, class... Args> const T* unify(size_t num_ops, Args&&... args) {
Expand Down

0 comments on commit 1112786

Please sign in to comment.