Skip to content

Commit

Permalink
Update hilti/toolchain/src/compiler/visitors/normalizer.cc
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Bannier <bbannier@users.noreply.github.com>
  • Loading branch information
rsmmr and bbannier authored Dec 9, 2022
1 parent 01d2867 commit 85cc2fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hilti/toolchain/src/compiler/visitors/normalizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ struct VisitorNormalizer : public visitor::PreOrder<void, VisitorNormalizer> {

// Helper to replace an type constructor expression that receives a
// constant argument with a corresponding ctor expression.
template<typename Ctor, typename Operator>
void tryReplaceCtorExpression(const Operator& op, position_t p, std::function<hilti::Ctor(const Ctor& ctor)> cb) {
template<typename Ctor, typename Operator, typename Fn>
void tryReplaceCtorExpression(const Operator& op, position_t p, Fn ctor)> cb) {
if ( auto ctor = detail::foldConstant<Ctor>(callArgument(op, 0)) ) {
try {
auto i = cb(*ctor);
Expand Down

0 comments on commit 85cc2fc

Please sign in to comment.