Skip to content

Commit 4d555ce

Browse files
committed
[Change] MakeC_NFA::setAction() method template.
1 parent 86034af commit 4d555ce

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

include/bux/FA.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class C_NFA
7878
C_NFA &append(const C_NFA &a);
7979
C_NFA &append(const T_Inputs &inputs);
8080
C_NFA &changeTo(int options);
81-
void setAction(T_Action &&action);
81+
template<class T> void setAction(T &&action);
8282
size_t totalFinalStates() const { return F.size(); }
8383

8484
private:
@@ -374,10 +374,11 @@ void C_NFA<T_Inputs,T_Action,C_Traits>::gatherStates(std::set<C_NfaState> &usedS
374374
}
375375

376376
template<class T_Inputs, class T_Action, class C_Traits>
377-
void C_NFA<T_Inputs,T_Action,C_Traits>::setAction(T_Action &&action)
377+
template<class T>
378+
void C_NFA<T_Inputs,T_Action,C_Traits>::setAction(T &&action)
378379
{
379380
for (auto &i: F)
380-
i.m_Tag = std::forward<T_Action>(action);
381+
i.m_Tag = std::forward<T>(action);
381382
}
382383

383384
template<class T_Inputs, class T_Action, class C_Traits>

0 commit comments

Comments
 (0)