From f1ffe28467c48bdceff904bc1dd0de26ea737095 Mon Sep 17 00:00:00 2001
From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz>
Date: Mon, 9 Jan 2017 20:40:56 +0100
Subject: [PATCH] static compare functor

---
 alib2data/src/alphabet/NonlinearVariableSymbol.h                | 2 +-
 alib2data/src/alphabet/SymbolSetSymbol.cpp                      | 2 +-
 alib2data/src/alphabet/ranked_symbol.hpp                        | 2 +-
 alib2data/src/automaton/FSM/CompactNFA.h                        | 2 +-
 alib2data/src/automaton/FSM/DFA.h                               | 2 +-
 alib2data/src/automaton/FSM/EpsilonNFA.h                        | 2 +-
 alib2data/src/automaton/FSM/ExtendedNFA.h                       | 2 +-
 alib2data/src/automaton/FSM/MultiInitialStateNFA.h              | 2 +-
 alib2data/src/automaton/FSM/NFA.h                               | 2 +-
 alib2data/src/automaton/PDA/DPDA.h                              | 2 +-
 alib2data/src/automaton/PDA/InputDrivenDPDA.h                   | 2 +-
 alib2data/src/automaton/PDA/InputDrivenNPDA.h                   | 2 +-
 alib2data/src/automaton/PDA/NPDA.h                              | 2 +-
 alib2data/src/automaton/PDA/NPDTA.h                             | 2 +-
 alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h   | 2 +-
 alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h   | 2 +-
 alib2data/src/automaton/PDA/SinglePopDPDA.h                     | 2 +-
 alib2data/src/automaton/PDA/SinglePopNPDA.h                     | 2 +-
 alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h               | 2 +-
 alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h               | 2 +-
 alib2data/src/automaton/TA/DFTA.h                               | 2 +-
 alib2data/src/automaton/TA/NFTA.h                               | 2 +-
 alib2data/src/automaton/TM/OneTapeDTM.h                         | 2 +-
 alib2data/src/grammar/ContextFree/CFG.h                         | 2 +-
 alib2data/src/grammar/ContextFree/CNF.h                         | 2 +-
 alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h              | 2 +-
 alib2data/src/grammar/ContextFree/GNF.h                         | 2 +-
 alib2data/src/grammar/ContextFree/LG.h                          | 2 +-
 alib2data/src/grammar/ContextSensitive/CSG.h                    | 2 +-
 alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h  | 2 +-
 alib2data/src/grammar/Regular/LeftLG.h                          | 2 +-
 alib2data/src/grammar/Regular/LeftRG.h                          | 2 +-
 alib2data/src/grammar/Regular/RightLG.h                         | 2 +-
 alib2data/src/grammar/Regular/RightRG.h                         | 2 +-
 .../grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h | 2 +-
 alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h        | 2 +-
 alib2data/src/indexes/SuffixArray.h                             | 2 +-
 alib2data/src/indexes/SuffixTrie.h                              | 2 +-
 alib2data/src/label/LabelSetLabel.cpp                           | 2 +-
 alib2data/src/regexp/formal/FormalRegExp.h                      | 2 +-
 alib2data/src/regexp/formal/FormalRegExpSymbol.h                | 2 +-
 alib2data/src/regexp/unbounded/UnboundedRegExp.h                | 2 +-
 alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.h     | 2 +-
 alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.h   | 2 +-
 alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.h          | 2 +-
 alib2data/src/rte/formal/FormalRTE.h                            | 2 +-
 alib2data/src/rte/formal/FormalRTEIteration.h                   | 2 +-
 alib2data/src/rte/formal/FormalRTESubstitution.h                | 2 +-
 alib2data/src/rte/formal/FormalRTESymbolAlphabet.h              | 2 +-
 alib2data/src/rte/formal/FormalRTESymbolSubst.h                 | 2 +-
 alib2data/src/string/CyclicString.h                             | 2 +-
 alib2data/src/string/Epsilon.h                                  | 2 +-
 alib2data/src/string/LinearString.h                             | 2 +-
 alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h     | 2 +-
 alib2data/src/tree/ranked/PrefixRankedBarPattern.h              | 2 +-
 alib2data/src/tree/ranked/PrefixRankedBarTree.h                 | 2 +-
 alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h        | 2 +-
 alib2data/src/tree/ranked/PrefixRankedPattern.h                 | 2 +-
 alib2data/src/tree/ranked/PrefixRankedTree.h                    | 2 +-
 alib2data/src/tree/ranked/RankedNonlinearPattern.h              | 2 +-
 alib2data/src/tree/ranked/RankedPattern.h                       | 2 +-
 alib2data/src/tree/ranked/RankedTree.h                          | 2 +-
 alib2data/src/tree/unranked/PrefixBarTree.h                     | 2 +-
 alib2data/src/tree/unranked/UnrankedNonlinearPattern.h          | 2 +-
 alib2data/src/tree/unranked/UnrankedPattern.h                   | 2 +-
 alib2data/src/tree/unranked/UnrankedTree.h                      | 2 +-
 66 files changed, 66 insertions(+), 66 deletions(-)

diff --git a/alib2data/src/alphabet/NonlinearVariableSymbol.h b/alib2data/src/alphabet/NonlinearVariableSymbol.h
index 66c0bb9ed3..288c01e75d 100644
--- a/alib2data/src/alphabet/NonlinearVariableSymbol.h
+++ b/alib2data/src/alphabet/NonlinearVariableSymbol.h
@@ -101,7 +101,7 @@ const SymbolType& NonlinearVariableSymbol < SymbolType >::getSymbol() const {
 
 template < class SymbolType >
 int NonlinearVariableSymbol < SymbolType >::compare ( const NonlinearVariableSymbol & other ) const {
-	std::compare < decltype ( m_symbol ) > comp;
+	static std::compare < decltype ( m_symbol ) > comp;
 
 	return comp ( m_symbol, other.m_symbol );
 }
diff --git a/alib2data/src/alphabet/SymbolSetSymbol.cpp b/alib2data/src/alphabet/SymbolSetSymbol.cpp
index 09538a10fe..9c5d599bc7 100644
--- a/alib2data/src/alphabet/SymbolSetSymbol.cpp
+++ b/alib2data/src/alphabet/SymbolSetSymbol.cpp
@@ -31,7 +31,7 @@ const std::set<Symbol>& SymbolSetSymbol::getData() const {
 }
 
 int SymbolSetSymbol::compare(const SymbolSetSymbol& other) const {
-	std::compare<std::set<Symbol>> comp;
+	static std::compare<std::set<Symbol>> comp;
 	return comp(symbol, other.symbol);
 }
 
diff --git a/alib2data/src/alphabet/ranked_symbol.hpp b/alib2data/src/alphabet/ranked_symbol.hpp
index 02db0acde7..5ade3c9f38 100644
--- a/alib2data/src/alphabet/ranked_symbol.hpp
+++ b/alib2data/src/alphabet/ranked_symbol.hpp
@@ -115,7 +115,7 @@ int ranked_symbol < SymbolType, RankType >::compare(const ranked_symbol& other)
 	auto first = std::tie ( m_symbol, m_rank );
 	auto second = std::tie ( other.m_symbol, other.m_rank );
 
-	std::compare<decltype(first)> comp;
+	static std::compare<decltype(first)> comp;
 	return comp(first, second);
 }
 
diff --git a/alib2data/src/automaton/FSM/CompactNFA.h b/alib2data/src/automaton/FSM/CompactNFA.h
index 88ae48c20d..7c783dead0 100644
--- a/alib2data/src/automaton/FSM/CompactNFA.h
+++ b/alib2data/src/automaton/FSM/CompactNFA.h
@@ -305,7 +305,7 @@ int CompactNFA < SymbolType, StateType >::compare ( const CompactNFA & other ) c
 	auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialState ( ), getFinalStates ( ), transitions );
 	auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ), other.getTransitions ( ) );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/automaton/FSM/DFA.h b/alib2data/src/automaton/FSM/DFA.h
index 84fd9a9022..7a30339f08 100644
--- a/alib2data/src/automaton/FSM/DFA.h
+++ b/alib2data/src/automaton/FSM/DFA.h
@@ -272,7 +272,7 @@ int DFA<SymbolType, StateType>::compare ( const DFA & other ) const {
 	auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialState ( ), getFinalStates ( ), transitions );
 	auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ), other.transitions );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/automaton/FSM/EpsilonNFA.h b/alib2data/src/automaton/FSM/EpsilonNFA.h
index 36ceb7b30c..a2aa5adada 100644
--- a/alib2data/src/automaton/FSM/EpsilonNFA.h
+++ b/alib2data/src/automaton/FSM/EpsilonNFA.h
@@ -491,7 +491,7 @@ int EpsilonNFA < SymbolType, EpsilonType, StateType >::compare ( const EpsilonNF
 	auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialState ( ), getFinalStates ( ), transitions );
 	auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ), other.getTransitions ( ) );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/automaton/FSM/ExtendedNFA.h b/alib2data/src/automaton/FSM/ExtendedNFA.h
index e902fd9ced..57c875d008 100644
--- a/alib2data/src/automaton/FSM/ExtendedNFA.h
+++ b/alib2data/src/automaton/FSM/ExtendedNFA.h
@@ -323,7 +323,7 @@ int ExtendedNFA < SymbolType, StateType >::compare ( const ExtendedNFA & other )
 	auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialState ( ), getFinalStates ( ), transitions );
 	auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ), other.getTransitions ( ) );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/automaton/FSM/MultiInitialStateNFA.h b/alib2data/src/automaton/FSM/MultiInitialStateNFA.h
index 8286c12864..8c987f3e3f 100644
--- a/alib2data/src/automaton/FSM/MultiInitialStateNFA.h
+++ b/alib2data/src/automaton/FSM/MultiInitialStateNFA.h
@@ -313,7 +313,7 @@ int MultiInitialStateNFA < SymbolType, StateType >::compare ( const MultiInitial
 	auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialStates ( ), getFinalStates ( ), transitions );
 	auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialStates ( ), other.getFinalStates ( ), other.getTransitions ( ) );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/automaton/FSM/NFA.h b/alib2data/src/automaton/FSM/NFA.h
index c1c7d72c27..b050e8ea29 100644
--- a/alib2data/src/automaton/FSM/NFA.h
+++ b/alib2data/src/automaton/FSM/NFA.h
@@ -298,7 +298,7 @@ int NFA < SymbolType, StateType >::compare ( const NFA & other ) const {
 	auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialState ( ), getFinalStates ( ), transitions );
 	auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ), other.getTransitions ( ) );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/automaton/PDA/DPDA.h b/alib2data/src/automaton/PDA/DPDA.h
index ea973a6b8e..e08468bc77 100644
--- a/alib2data/src/automaton/PDA/DPDA.h
+++ b/alib2data/src/automaton/PDA/DPDA.h
@@ -390,7 +390,7 @@ int DPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType >::c
 	auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), transitions);
 	auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.transitions);
 
-	std::compare<decltype(first)> comp;
+	static std::compare<decltype(first)> comp;
 	return comp(first, second);
 }
 
diff --git a/alib2data/src/automaton/PDA/InputDrivenDPDA.h b/alib2data/src/automaton/PDA/InputDrivenDPDA.h
index ff36a0154f..74078a4752 100644
--- a/alib2data/src/automaton/PDA/InputDrivenDPDA.h
+++ b/alib2data/src/automaton/PDA/InputDrivenDPDA.h
@@ -366,7 +366,7 @@ int InputDrivenDPDA < InputSymbolType, PushdownStoreSymbolType, StateType >::com
 	auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), getPushdownStoreOperations(), transitions);
 	auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.getPushdownStoreOperations(), other.transitions);
 
-	std::compare<decltype(first)> comp;
+	static std::compare<decltype(first)> comp;
 	return comp(first, second);
 }
 
diff --git a/alib2data/src/automaton/PDA/InputDrivenNPDA.h b/alib2data/src/automaton/PDA/InputDrivenNPDA.h
index 8c7e554d3d..4dab6203a5 100644
--- a/alib2data/src/automaton/PDA/InputDrivenNPDA.h
+++ b/alib2data/src/automaton/PDA/InputDrivenNPDA.h
@@ -362,7 +362,7 @@ int InputDrivenNPDA < InputSymbolType, PushdownStoreSymbolType, StateType >::com
 	auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), getPushdownStoreOperations(), transitions);
 	auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.getPushdownStoreOperations(), other.transitions);
 
-	std::compare<decltype(first)> comp;
+	static std::compare<decltype(first)> comp;
 	return comp(first, second);
 }
 
diff --git a/alib2data/src/automaton/PDA/NPDA.h b/alib2data/src/automaton/PDA/NPDA.h
index 008b111c33..590f0a2a65 100644
--- a/alib2data/src/automaton/PDA/NPDA.h
+++ b/alib2data/src/automaton/PDA/NPDA.h
@@ -278,7 +278,7 @@ int NPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType >::c
 	auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), transitions);
 	auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.transitions);
 
-	std::compare<decltype(first)> comp;
+	static std::compare<decltype(first)> comp;
 	return comp(first, second);
 }
 
diff --git a/alib2data/src/automaton/PDA/NPDTA.h b/alib2data/src/automaton/PDA/NPDTA.h
index 2aab9dd0c5..b37f95ad80 100644
--- a/alib2data/src/automaton/PDA/NPDTA.h
+++ b/alib2data/src/automaton/PDA/NPDTA.h
@@ -333,7 +333,7 @@ int NPDTA < InputSymbolType, OutputSymbolType, EpsilonType, PushdownStoreSymbolT
 	auto first = std::tie(getStates(), getInputAlphabet(), getOutputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), transitions);
 	auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getOutputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.transitions);
 
-	std::compare<decltype(first)> comp;
+	static std::compare<decltype(first)> comp;
 	return comp(first, second);
 }
 
diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h
index c0ed83185b..0bd995e3b7 100644
--- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h
+++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h
@@ -545,7 +545,7 @@ int RealTimeHeightDeterministicDPDA < InputSymbolType, EpsilonType, PushdownStor
 	auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getBottomOfTheStackSymbol(), callTransitions, returnTransitions, localTransitions);
 	auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getBottomOfTheStackSymbol(), other.callTransitions, other.returnTransitions, other.localTransitions);
 
-	std::compare<decltype(first)> comp;
+	static std::compare<decltype(first)> comp;
 	return comp(first, second);
 }
 
diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h
index 5a0a1913aa..7bdd3441a8 100644
--- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h
+++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h
@@ -439,7 +439,7 @@ int RealTimeHeightDeterministicNPDA < InputSymbolType, EpsilonType, PushdownStor
 	auto first = std::tie(getStates(), getInputAlphabet(), getInitialStates(), getFinalStates(), getPushdownStoreAlphabet(), getBottomOfTheStackSymbol(), callTransitions, returnTransitions, localTransitions);
 	auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialStates(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getBottomOfTheStackSymbol(), other.callTransitions, other.returnTransitions, other.localTransitions);
 
-	std::compare<decltype(first)> comp;
+	static std::compare<decltype(first)> comp;
 	return comp(first, second);
 }
 
diff --git a/alib2data/src/automaton/PDA/SinglePopDPDA.h b/alib2data/src/automaton/PDA/SinglePopDPDA.h
index 84dcfe7301..c364ccb194 100644
--- a/alib2data/src/automaton/PDA/SinglePopDPDA.h
+++ b/alib2data/src/automaton/PDA/SinglePopDPDA.h
@@ -321,7 +321,7 @@ int SinglePopDPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, State
 	auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), transitions);
 	auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.transitions);
 
-	std::compare<decltype(first)> comp;
+	static std::compare<decltype(first)> comp;
 	return comp(first, second);
 }
 
diff --git a/alib2data/src/automaton/PDA/SinglePopNPDA.h b/alib2data/src/automaton/PDA/SinglePopNPDA.h
index 24ca2f6160..5602b5d998 100644
--- a/alib2data/src/automaton/PDA/SinglePopNPDA.h
+++ b/alib2data/src/automaton/PDA/SinglePopNPDA.h
@@ -283,7 +283,7 @@ int SinglePopNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, State
 	auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), transitions);
 	auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.transitions);
 
-	std::compare<decltype(first)> comp;
+	static std::compare<decltype(first)> comp;
 	return comp(first, second);
 }
 
diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h
index 4e03c71f28..432f2b7317 100644
--- a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h
+++ b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h
@@ -461,7 +461,7 @@ int VisiblyPushdownDPDA < InputSymbolType, PushdownStoreSymbolType, StateType >:
 	auto first = std::tie(getStates(), getCallInputAlphabet(), getReturnInputAlphabet(), getLocalInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getBottomOfTheStackSymbol(), callTransitions, returnTransitions, localTransitions);
 	auto second = std::tie(other.getStates(), other.getCallInputAlphabet(), other.getReturnInputAlphabet(), other.getLocalInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getBottomOfTheStackSymbol(), other.callTransitions, other.returnTransitions, other.localTransitions);
 
-	std::compare<decltype(first)> comp;
+	static std::compare<decltype(first)> comp;
 	return comp(first, second);
 }
 
diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h
index 58185064e8..ce801c4711 100644
--- a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h
+++ b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h
@@ -400,7 +400,7 @@ int VisiblyPushdownNPDA < InputSymbolType, PushdownStoreSymbolType, StateType >:
 	auto first = std::tie(getStates(), getCallInputAlphabet(), getReturnInputAlphabet(), getLocalInputAlphabet(), getInitialStates(), getFinalStates(), getPushdownStoreAlphabet(), getBottomOfTheStackSymbol(), callTransitions, returnTransitions, localTransitions);
 	auto second = std::tie(other.getStates(), other.getCallInputAlphabet(), other.getReturnInputAlphabet(), other.getLocalInputAlphabet(), other.getInitialStates(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getBottomOfTheStackSymbol(), other.callTransitions, other.returnTransitions, other.localTransitions);
 
-	std::compare<decltype(first)> comp;
+	static std::compare<decltype(first)> comp;
 	return comp(first, second);
 }
 
diff --git a/alib2data/src/automaton/TA/DFTA.h b/alib2data/src/automaton/TA/DFTA.h
index 6629778541..6c96b2dc08 100644
--- a/alib2data/src/automaton/TA/DFTA.h
+++ b/alib2data/src/automaton/TA/DFTA.h
@@ -218,7 +218,7 @@ int DFTA < SymbolType, RankType, StateType >::compare(const DFTA& other) const {
 	auto first = std::tie(getStates(), getInputAlphabet(), getFinalStates(), transitions);
 	auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getFinalStates(), other.transitions);
 
-	std::compare<decltype(first)> comp;
+	static std::compare<decltype(first)> comp;
 	return comp(first, second);
 }
 
diff --git a/alib2data/src/automaton/TA/NFTA.h b/alib2data/src/automaton/TA/NFTA.h
index 85a1f23a4b..ac5e8af6fd 100644
--- a/alib2data/src/automaton/TA/NFTA.h
+++ b/alib2data/src/automaton/TA/NFTA.h
@@ -239,7 +239,7 @@ int NFTA < SymbolType, RankType, StateType >::compare(const NFTA& other) const {
 	auto first = std::tie(getStates(), getInputAlphabet(), getFinalStates(), transitions);
 	auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getFinalStates(), other.transitions);
 
-	std::compare<decltype(first)> comp;
+	static std::compare<decltype(first)> comp;
 	return comp(first, second);
 }
 
diff --git a/alib2data/src/automaton/TM/OneTapeDTM.h b/alib2data/src/automaton/TM/OneTapeDTM.h
index 3c140bbd3c..b4f077e997 100644
--- a/alib2data/src/automaton/TM/OneTapeDTM.h
+++ b/alib2data/src/automaton/TM/OneTapeDTM.h
@@ -264,7 +264,7 @@ int OneTapeDTM<SymbolType, StateType>::compare(const OneTapeDTM<SymbolType, Stat
 	auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getTapeAlphabet(), getBlankSymbol(), transitions);
 	auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getTapeAlphabet(), other.getBlankSymbol(), other.transitions);
 
-	std::compare<decltype(first)> comp;
+	static std::compare<decltype(first)> comp;
 	return comp(first, second);
 }
 
diff --git a/alib2data/src/grammar/ContextFree/CFG.h b/alib2data/src/grammar/ContextFree/CFG.h
index 90b583c9f7..6b668c145b 100644
--- a/alib2data/src/grammar/ContextFree/CFG.h
+++ b/alib2data/src/grammar/ContextFree/CFG.h
@@ -194,7 +194,7 @@ int CFG < SymbolType >::compare ( const CFG & other ) const {
 	auto first = std::tie ( getTerminalAlphabet ( ), getNonterminalAlphabet ( ), getInitialSymbol ( ), rules );
 	auto second = std::tie ( other.getTerminalAlphabet ( ), other.getNonterminalAlphabet ( ), other.getInitialSymbol ( ), other.rules );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/grammar/ContextFree/CNF.h b/alib2data/src/grammar/ContextFree/CNF.h
index bb27ac72bf..a24e260b36 100644
--- a/alib2data/src/grammar/ContextFree/CNF.h
+++ b/alib2data/src/grammar/ContextFree/CNF.h
@@ -278,7 +278,7 @@ int CNF < SymbolType >::compare ( const CNF & other ) const {
 	auto first = std::tie ( getTerminalAlphabet ( ), getNonterminalAlphabet ( ), getInitialSymbol ( ), rules );
 	auto second = std::tie ( other.getTerminalAlphabet ( ), other.getNonterminalAlphabet ( ), other.getInitialSymbol ( ), other.rules );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h
index d4c39abbc7..809b4fcc08 100644
--- a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h
+++ b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h
@@ -216,7 +216,7 @@ int EpsilonFreeCFG < SymbolType >::compare ( const EpsilonFreeCFG & other ) cons
 	auto first = std::tie ( getTerminalAlphabet ( ), getNonterminalAlphabet ( ), getInitialSymbol ( ), rules );
 	auto second = std::tie ( other.getTerminalAlphabet ( ), other.getNonterminalAlphabet ( ), other.getInitialSymbol ( ), other.rules );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/grammar/ContextFree/GNF.h b/alib2data/src/grammar/ContextFree/GNF.h
index f9c024c46a..a16cc04f48 100644
--- a/alib2data/src/grammar/ContextFree/GNF.h
+++ b/alib2data/src/grammar/ContextFree/GNF.h
@@ -226,7 +226,7 @@ int GNF < SymbolType >::compare ( const GNF & other ) const {
 	auto first = std::tie ( getTerminalAlphabet ( ), getNonterminalAlphabet ( ), getInitialSymbol ( ), rules );
 	auto second = std::tie ( other.getTerminalAlphabet ( ), other.getNonterminalAlphabet ( ), other.getInitialSymbol ( ), other.rules );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/grammar/ContextFree/LG.h b/alib2data/src/grammar/ContextFree/LG.h
index 37fbd2632d..4c81ce04f8 100644
--- a/alib2data/src/grammar/ContextFree/LG.h
+++ b/alib2data/src/grammar/ContextFree/LG.h
@@ -260,7 +260,7 @@ int LG < SymbolType >::compare ( const LG & other ) const {
 	auto first = std::tie ( getTerminalAlphabet ( ), getNonterminalAlphabet ( ), getInitialSymbol ( ), rules );
 	auto second = std::tie ( other.getTerminalAlphabet ( ), other.getNonterminalAlphabet ( ), other.getInitialSymbol ( ), other.rules );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/grammar/ContextSensitive/CSG.h b/alib2data/src/grammar/ContextSensitive/CSG.h
index 1a47c6eb20..a241871519 100644
--- a/alib2data/src/grammar/ContextSensitive/CSG.h
+++ b/alib2data/src/grammar/ContextSensitive/CSG.h
@@ -183,7 +183,7 @@ int CSG < SymbolType >::compare ( const CSG & other ) const {
 	auto first = std::tie ( getTerminalAlphabet ( ), getNonterminalAlphabet ( ), getInitialSymbol ( ), rules );
 	auto second = std::tie ( other.getTerminalAlphabet ( ), other.getNonterminalAlphabet ( ), other.getInitialSymbol ( ), other.rules );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h
index 074b71b2c3..de01bff186 100644
--- a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h
+++ b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h
@@ -181,7 +181,7 @@ int NonContractingGrammar < SymbolType >::compare ( const NonContractingGrammar
 	auto first = std::tie ( getTerminalAlphabet ( ), getNonterminalAlphabet ( ), getInitialSymbol ( ), rules );
 	auto second = std::tie ( other.getTerminalAlphabet ( ), other.getNonterminalAlphabet ( ), other.getInitialSymbol ( ), other.rules );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/grammar/Regular/LeftLG.h b/alib2data/src/grammar/Regular/LeftLG.h
index 5f5655f23e..19229345d7 100644
--- a/alib2data/src/grammar/Regular/LeftLG.h
+++ b/alib2data/src/grammar/Regular/LeftLG.h
@@ -246,7 +246,7 @@ int LeftLG < SymbolType >::compare ( const LeftLG & other ) const {
 	auto first = std::tie ( getTerminalAlphabet ( ), getNonterminalAlphabet ( ), getInitialSymbol ( ), rules );
 	auto second = std::tie ( other.getTerminalAlphabet ( ), other.getNonterminalAlphabet ( ), other.getInitialSymbol ( ), other.rules );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/grammar/Regular/LeftRG.h b/alib2data/src/grammar/Regular/LeftRG.h
index bd48006b08..7bc223fcf9 100644
--- a/alib2data/src/grammar/Regular/LeftRG.h
+++ b/alib2data/src/grammar/Regular/LeftRG.h
@@ -348,7 +348,7 @@ int LeftRG < SymbolType >::compare ( const LeftRG & other ) const {
 	auto first = std::tie ( getTerminalAlphabet ( ), getNonterminalAlphabet ( ), getInitialSymbol ( ), rules );
 	auto second = std::tie ( other.getTerminalAlphabet ( ), other.getNonterminalAlphabet ( ), other.getInitialSymbol ( ), other.rules );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/grammar/Regular/RightLG.h b/alib2data/src/grammar/Regular/RightLG.h
index e011f4ab65..ec0c428fcd 100644
--- a/alib2data/src/grammar/Regular/RightLG.h
+++ b/alib2data/src/grammar/Regular/RightLG.h
@@ -246,7 +246,7 @@ int RightLG < SymbolType >::compare ( const RightLG & other ) const {
 	auto first = std::tie ( getTerminalAlphabet ( ), getNonterminalAlphabet ( ), getInitialSymbol ( ), rules );
 	auto second = std::tie ( other.getTerminalAlphabet ( ), other.getNonterminalAlphabet ( ), other.getInitialSymbol ( ), other.rules );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/grammar/Regular/RightRG.h b/alib2data/src/grammar/Regular/RightRG.h
index 947d092668..359d498efd 100644
--- a/alib2data/src/grammar/Regular/RightRG.h
+++ b/alib2data/src/grammar/Regular/RightRG.h
@@ -291,7 +291,7 @@ int RightRG < SymbolType >::compare ( const RightRG & other ) const {
 	auto first = std::tie ( getTerminalAlphabet ( ), getNonterminalAlphabet ( ), getInitialSymbol ( ), rules );
 	auto second = std::tie ( other.getTerminalAlphabet ( ), other.getNonterminalAlphabet ( ), other.getInitialSymbol ( ), other.rules );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h
index 730b37603d..dbdb089aad 100644
--- a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h
+++ b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h
@@ -163,7 +163,7 @@ int ContextPreservingUnrestrictedGrammar < SymbolType >::compare ( const Context
 	auto first = std::tie ( getTerminalAlphabet ( ), getNonterminalAlphabet ( ), getInitialSymbol ( ), rules );
 	auto second = std::tie ( other.getTerminalAlphabet ( ), other.getNonterminalAlphabet ( ), other.getInitialSymbol ( ), other.rules );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h
index 13c1d41f71..0b5b287d17 100644
--- a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h
+++ b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h
@@ -161,7 +161,7 @@ int UnrestrictedGrammar < SymbolType >::compare ( const UnrestrictedGrammar & ot
 	auto first = std::tie ( getTerminalAlphabet ( ), getNonterminalAlphabet ( ), getInitialSymbol ( ), rules );
 	auto second = std::tie ( other.getTerminalAlphabet ( ), other.getNonterminalAlphabet ( ), other.getInitialSymbol ( ), other.rules );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/indexes/SuffixArray.h b/alib2data/src/indexes/SuffixArray.h
index 8232de4af3..86a8717262 100644
--- a/alib2data/src/indexes/SuffixArray.h
+++ b/alib2data/src/indexes/SuffixArray.h
@@ -155,7 +155,7 @@ int SuffixArray < SymbolType >::compare ( const SuffixArray & other ) const {
 	auto first = std::tie ( getData ( ), getString ( ), getAlphabet ( ) );
 	auto second = std::tie ( other.getData ( ), other.getString ( ), getAlphabet ( ) );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/indexes/SuffixTrie.h b/alib2data/src/indexes/SuffixTrie.h
index 515eaaa95d..1373da81a1 100644
--- a/alib2data/src/indexes/SuffixTrie.h
+++ b/alib2data/src/indexes/SuffixTrie.h
@@ -188,7 +188,7 @@ int SuffixTrie < EdgeType, NodeType >::compare ( const SuffixTrie & other ) cons
 	auto first = std::tie ( getRoot ( ), getEdgeAlphabet ( ), getNodeAlphabet ( ) );
 	auto second = std::tie ( other.getRoot ( ), other.getEdgeAlphabet ( ), getNodeAlphabet ( ) );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/label/LabelSetLabel.cpp b/alib2data/src/label/LabelSetLabel.cpp
index 69976e3708..1d8cc234a3 100644
--- a/alib2data/src/label/LabelSetLabel.cpp
+++ b/alib2data/src/label/LabelSetLabel.cpp
@@ -32,7 +32,7 @@ const std::set<Label>& LabelSetLabel::getData() const {
 }
 
 int LabelSetLabel::compare(const LabelSetLabel& other) const {
-	std::compare<std::set<Label>> comp;
+	static std::compare<std::set<Label>> comp;
 	return comp(label, other.label);
 }
 
diff --git a/alib2data/src/regexp/formal/FormalRegExp.h b/alib2data/src/regexp/formal/FormalRegExp.h
index 7ab95c272e..7532a0cd99 100644
--- a/alib2data/src/regexp/formal/FormalRegExp.h
+++ b/alib2data/src/regexp/formal/FormalRegExp.h
@@ -168,7 +168,7 @@ int FormalRegExp < SymbolType >::compare ( const FormalRegExp & other ) const {
 	auto first = std::tie ( m_regExp.getStructure ( ), getAlphabet ( ) );
 	auto second = std::tie ( other.m_regExp.getStructure ( ), other.getAlphabet ( ) );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/regexp/formal/FormalRegExpSymbol.h b/alib2data/src/regexp/formal/FormalRegExpSymbol.h
index c48c6a97d7..00f20d7fe6 100644
--- a/alib2data/src/regexp/formal/FormalRegExpSymbol.h
+++ b/alib2data/src/regexp/formal/FormalRegExpSymbol.h
@@ -106,7 +106,7 @@ std::smart_ptr < UnboundedRegExpElement < SymbolType > > FormalRegExpSymbol < Sy
 
 template < class SymbolType >
 int FormalRegExpSymbol < SymbolType >::compare ( const FormalRegExpSymbol & other ) const {
-	std::compare < decltype ( m_symbol ) > comp;
+	static std::compare < decltype ( m_symbol ) > comp;
 
 	return comp ( m_symbol, other.m_symbol );
 }
diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExp.h b/alib2data/src/regexp/unbounded/UnboundedRegExp.h
index 579e655f88..6366819247 100644
--- a/alib2data/src/regexp/unbounded/UnboundedRegExp.h
+++ b/alib2data/src/regexp/unbounded/UnboundedRegExp.h
@@ -168,7 +168,7 @@ int UnboundedRegExp < SymbolType >::compare ( const UnboundedRegExp & other ) co
 	auto first = std::tie ( m_regExp.getStructure ( ), getAlphabet ( ) );
 	auto second = std::tie ( other.m_regExp.getStructure ( ), other.getAlphabet ( ) );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.h b/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.h
index f4d4e61101..d05e9d2820 100644
--- a/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.h
+++ b/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.h
@@ -147,7 +147,7 @@ std::smart_ptr < FormalRegExpElement < SymbolType > > UnboundedRegExpAlternation
 
 template < class SymbolType >
 int UnboundedRegExpAlternation < SymbolType >::compare ( const UnboundedRegExpAlternation < SymbolType > & other ) const {
-	std::compare < typename std::decay < decltype ( getElements ( ) ) >::type > comp;
+	static std::compare < typename std::decay < decltype ( getElements ( ) ) >::type > comp;
 
 	return comp ( getElements ( ), other.getElements ( ) );
 }
diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.h b/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.h
index eaa21a085d..794e9f9abe 100644
--- a/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.h
+++ b/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.h
@@ -147,7 +147,7 @@ std::smart_ptr < FormalRegExpElement < SymbolType > > UnboundedRegExpConcatenati
 
 template < class SymbolType >
 int UnboundedRegExpConcatenation < SymbolType >::compare ( const UnboundedRegExpConcatenation < SymbolType > & other ) const {
-	std::compare < typename std::decay < decltype ( getElements ( ) ) >::type > comp;
+	static std::compare < typename std::decay < decltype ( getElements ( ) ) >::type > comp;
 
 	return comp ( getElements ( ), other.getElements ( ) );
 }
diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.h b/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.h
index c1ada6f4ec..c1c0a57dfd 100644
--- a/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.h
+++ b/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.h
@@ -108,7 +108,7 @@ std::smart_ptr < FormalRegExpElement < SymbolType > > UnboundedRegExpSymbol < Sy
 
 template < class SymbolType >
 int UnboundedRegExpSymbol < SymbolType >::compare ( const UnboundedRegExpSymbol & other ) const {
-	std::compare < decltype ( m_symbol ) > comp;
+	static std::compare < decltype ( m_symbol ) > comp;
 
 	return comp ( m_symbol, other.m_symbol );
 }
diff --git a/alib2data/src/rte/formal/FormalRTE.h b/alib2data/src/rte/formal/FormalRTE.h
index a8f3770455..bb82d2bcf4 100644
--- a/alib2data/src/rte/formal/FormalRTE.h
+++ b/alib2data/src/rte/formal/FormalRTE.h
@@ -199,7 +199,7 @@ int FormalRTE < SymbolType, RankType >::compare ( const FormalRTE & other ) cons
 	auto first = std::tie ( m_rte, getAlphabet ( ), getSubstitutionAlphabet ( ) );
 	auto second = std::tie ( m_rte, other.getAlphabet ( ), getSubstitutionAlphabet ( ) );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/rte/formal/FormalRTEIteration.h b/alib2data/src/rte/formal/FormalRTEIteration.h
index 50be3ec68a..fa4b1982a3 100644
--- a/alib2data/src/rte/formal/FormalRTEIteration.h
+++ b/alib2data/src/rte/formal/FormalRTEIteration.h
@@ -153,7 +153,7 @@ int FormalRTEIteration < SymbolType, RankType >::compare ( const FormalRTEIterat
 	auto first = std::tie ( getElement ( ), getSubstitutionSymbol ( ) );
 	auto second = std::tie ( other.getElement ( ), other.getSubstitutionSymbol ( ) );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/rte/formal/FormalRTESubstitution.h b/alib2data/src/rte/formal/FormalRTESubstitution.h
index ca45b93670..e092770b03 100644
--- a/alib2data/src/rte/formal/FormalRTESubstitution.h
+++ b/alib2data/src/rte/formal/FormalRTESubstitution.h
@@ -176,7 +176,7 @@ int FormalRTESubstitution < SymbolType, RankType >::compare ( const FormalRTESub
 	auto first = std::tie ( getLeftElement ( ), getRightElement ( ), getSubstitutionSymbol ( ) );
 	auto second = std::tie ( other.getLeftElement ( ), other.getRightElement ( ), other.getSubstitutionSymbol ( ) );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/rte/formal/FormalRTESymbolAlphabet.h b/alib2data/src/rte/formal/FormalRTESymbolAlphabet.h
index 07d63d5f2c..bb0aa449d2 100644
--- a/alib2data/src/rte/formal/FormalRTESymbolAlphabet.h
+++ b/alib2data/src/rte/formal/FormalRTESymbolAlphabet.h
@@ -121,7 +121,7 @@ int FormalRTESymbolAlphabet < SymbolType, RankType >::compare ( const FormalRTES
 	auto first = std::tie ( this->getSymbol ( ), this->getChildren ( ) );
 	auto second = std::tie ( other.getSymbol ( ), other.getChildren ( ) );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/rte/formal/FormalRTESymbolSubst.h b/alib2data/src/rte/formal/FormalRTESymbolSubst.h
index b907d52860..56cd6ad010 100644
--- a/alib2data/src/rte/formal/FormalRTESymbolSubst.h
+++ b/alib2data/src/rte/formal/FormalRTESymbolSubst.h
@@ -87,7 +87,7 @@ FormalRTESymbolSubst < SymbolType, RankType > * FormalRTESymbolSubst < SymbolTyp
 
 template < class SymbolType, class RankType >
 int FormalRTESymbolSubst < SymbolType, RankType >::compare ( const FormalRTESymbolSubst & other ) const {
-	std::compare < decltype ( this->getSymbol ( ) ) > comp;
+	static std::compare < decltype ( this->getSymbol ( ) ) > comp;
 
 	return comp ( this->getSymbol ( ), other.getSymbol ( ) );
 }
diff --git a/alib2data/src/string/CyclicString.h b/alib2data/src/string/CyclicString.h
index 513da9e8e0..b73a41a81c 100644
--- a/alib2data/src/string/CyclicString.h
+++ b/alib2data/src/string/CyclicString.h
@@ -161,7 +161,7 @@ int CyclicString < SymbolType >::compare(const CyclicString& other) const {
 	auto first = std::tie ( m_Data, getAlphabet ( ) );
 	auto second = std::tie ( other.m_Data, other.getAlphabet ( ) );
 
-	std::compare<decltype(first)> comp;
+	static std::compare<decltype(first)> comp;
 	return comp(first, second);
 }
 
diff --git a/alib2data/src/string/Epsilon.h b/alib2data/src/string/Epsilon.h
index 799499c4b0..58b8eff986 100644
--- a/alib2data/src/string/Epsilon.h
+++ b/alib2data/src/string/Epsilon.h
@@ -115,7 +115,7 @@ bool Epsilon < SymbolType >::isEmpty() const {
 
 template < class SymbolType >
 int Epsilon < SymbolType >::compare(const Epsilon& other) const {
-	std::compare<std::set<SymbolType>> comp;
+	static std::compare<std::set<SymbolType>> comp;
 	return comp(getAlphabet(), other.getAlphabet());
 }
 
diff --git a/alib2data/src/string/LinearString.h b/alib2data/src/string/LinearString.h
index e8e7557443..b3de2c9f88 100644
--- a/alib2data/src/string/LinearString.h
+++ b/alib2data/src/string/LinearString.h
@@ -218,7 +218,7 @@ int LinearString < SymbolType >::compare ( const LinearString & other ) const {
 	auto first = std::tie ( m_Data, getAlphabet() );
 	auto second = std::tie ( other.m_Data, other.getAlphabet() );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h b/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h
index 7ab57a38e1..ae2b41614b 100644
--- a/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h
+++ b/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h
@@ -260,7 +260,7 @@ int PrefixRankedBarNonlinearPattern < SymbolType, RankType >::compare ( const Pr
 	auto first = std::tie ( m_Data, getAlphabet ( ), getSubtreeWildcard ( ), getNonlinearVariables ( ), getBars ( ), getVariablesBar ( ) );
 	auto second = std::tie ( other.m_Data, other.getAlphabet ( ), other.getSubtreeWildcard ( ), other.getNonlinearVariables ( ), other.getBars ( ), other.getVariablesBar ( ) );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/tree/ranked/PrefixRankedBarPattern.h b/alib2data/src/tree/ranked/PrefixRankedBarPattern.h
index 3e5d3e25bf..08b6516546 100644
--- a/alib2data/src/tree/ranked/PrefixRankedBarPattern.h
+++ b/alib2data/src/tree/ranked/PrefixRankedBarPattern.h
@@ -226,7 +226,7 @@ int PrefixRankedBarPattern < SymbolType, RankType >::compare ( const PrefixRanke
 	auto first = std::tie ( m_Data, getAlphabet(), getSubtreeWildcard(), getBars(), getVariablesBar() );
 	auto second = std::tie ( other.m_Data, other.getAlphabet(), other.getSubtreeWildcard(), other.getBars(), other.getVariablesBar() );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/tree/ranked/PrefixRankedBarTree.h b/alib2data/src/tree/ranked/PrefixRankedBarTree.h
index 6b560bf189..b223692296 100644
--- a/alib2data/src/tree/ranked/PrefixRankedBarTree.h
+++ b/alib2data/src/tree/ranked/PrefixRankedBarTree.h
@@ -200,7 +200,7 @@ int PrefixRankedBarTree < SymbolType, RankType >::compare ( const PrefixRankedBa
 	auto first = std::tie ( m_Data, getAlphabet(), getBars() );
 	auto second = std::tie ( other.m_Data, other.getAlphabet(), other.getBars() );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h b/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h
index e29d8c7081..497bbf7682 100644
--- a/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h
+++ b/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h
@@ -216,7 +216,7 @@ int PrefixRankedNonlinearPattern < SymbolType, RankType >::compare ( const Prefi
 	auto first = std::tie ( m_Data, getAlphabet ( ), getSubtreeWildcard ( ), getNonlinearVariables ( ) );
 	auto second = std::tie ( other.m_Data, other.getAlphabet ( ), other.getSubtreeWildcard ( ), other.getNonlinearVariables ( ) );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/tree/ranked/PrefixRankedPattern.h b/alib2data/src/tree/ranked/PrefixRankedPattern.h
index 2480d6a81d..c9c0adc895 100644
--- a/alib2data/src/tree/ranked/PrefixRankedPattern.h
+++ b/alib2data/src/tree/ranked/PrefixRankedPattern.h
@@ -188,7 +188,7 @@ int PrefixRankedPattern < SymbolType, RankType >::compare ( const PrefixRankedPa
 	auto first = std::tie ( m_Data, getAlphabet ( ), getSubtreeWildcard ( ) );
 	auto second = std::tie ( other.m_Data, other.getAlphabet ( ), other.getSubtreeWildcard ( ) );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/tree/ranked/PrefixRankedTree.h b/alib2data/src/tree/ranked/PrefixRankedTree.h
index fcb73f78e0..12e02ca1ed 100644
--- a/alib2data/src/tree/ranked/PrefixRankedTree.h
+++ b/alib2data/src/tree/ranked/PrefixRankedTree.h
@@ -175,7 +175,7 @@ int PrefixRankedTree < SymbolType, RankType >::compare ( const PrefixRankedTree
 	auto first = std::tie ( m_Data, getAlphabet() );
 	auto second = std::tie ( other.m_Data, other.getAlphabet() );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/tree/ranked/RankedNonlinearPattern.h b/alib2data/src/tree/ranked/RankedNonlinearPattern.h
index 464c70c8c5..ed71ded39d 100644
--- a/alib2data/src/tree/ranked/RankedNonlinearPattern.h
+++ b/alib2data/src/tree/ranked/RankedNonlinearPattern.h
@@ -196,7 +196,7 @@ int RankedNonlinearPattern < SymbolType, RankType >::compare ( const RankedNonli
 	auto first = std::tie ( content, getAlphabet(), getSubtreeWildcard(), getNonlinearVariables() );
 	auto second = std::tie ( other.content, other.getAlphabet(), other.getSubtreeWildcard(), getNonlinearVariables() );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/tree/ranked/RankedPattern.h b/alib2data/src/tree/ranked/RankedPattern.h
index 527ff6dd08..6460d17fcc 100644
--- a/alib2data/src/tree/ranked/RankedPattern.h
+++ b/alib2data/src/tree/ranked/RankedPattern.h
@@ -186,7 +186,7 @@ int RankedPattern < SymbolType, RankType >::compare ( const RankedPattern & othe
 	auto first = std::tie ( content, getAlphabet(), getSubtreeWildcard() );
 	auto second = std::tie ( other.content, other.getAlphabet(), other.getSubtreeWildcard() );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/tree/ranked/RankedTree.h b/alib2data/src/tree/ranked/RankedTree.h
index 773318cb62..5fc5a8c3a4 100644
--- a/alib2data/src/tree/ranked/RankedTree.h
+++ b/alib2data/src/tree/ranked/RankedTree.h
@@ -181,7 +181,7 @@ int RankedTree < SymbolType, RankType >::compare ( const RankedTree & other ) co
 	auto first = std::tie ( content, getAlphabet() );
 	auto second = std::tie ( other.content, other.getAlphabet() );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/tree/unranked/PrefixBarTree.h b/alib2data/src/tree/unranked/PrefixBarTree.h
index 55436bec2d..5585a4acd5 100644
--- a/alib2data/src/tree/unranked/PrefixBarTree.h
+++ b/alib2data/src/tree/unranked/PrefixBarTree.h
@@ -190,7 +190,7 @@ int PrefixBarTree < SymbolType >::compare ( const PrefixBarTree & other ) const
 	auto first = std::tie ( m_Data, getAlphabet ( ), getBar ( ) );
 	auto second = std::tie ( other.m_Data, other.getAlphabet ( ), other.getBar ( ) );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/tree/unranked/UnrankedNonlinearPattern.h b/alib2data/src/tree/unranked/UnrankedNonlinearPattern.h
index d6e45fed68..21116d3474 100644
--- a/alib2data/src/tree/unranked/UnrankedNonlinearPattern.h
+++ b/alib2data/src/tree/unranked/UnrankedNonlinearPattern.h
@@ -190,7 +190,7 @@ int UnrankedNonlinearPattern < SymbolType >::compare ( const UnrankedNonlinearPa
 	auto first = std::tie ( content, getAlphabet(), getSubtreeWildcard(), getNonlinearVariables() );
 	auto second = std::tie ( other.content, other.getAlphabet(), other.getSubtreeWildcard(), getNonlinearVariables() );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/tree/unranked/UnrankedPattern.h b/alib2data/src/tree/unranked/UnrankedPattern.h
index 09a89e49f2..9fd51cf7bc 100644
--- a/alib2data/src/tree/unranked/UnrankedPattern.h
+++ b/alib2data/src/tree/unranked/UnrankedPattern.h
@@ -174,7 +174,7 @@ int UnrankedPattern < SymbolType >::compare ( const UnrankedPattern & other ) co
 	auto first = std::tie ( content, getAlphabet(), getSubtreeWildcard() );
 	auto second = std::tie ( other.content, other.getAlphabet(), other.getSubtreeWildcard() );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
diff --git a/alib2data/src/tree/unranked/UnrankedTree.h b/alib2data/src/tree/unranked/UnrankedTree.h
index f9a4825b89..c504e6155b 100644
--- a/alib2data/src/tree/unranked/UnrankedTree.h
+++ b/alib2data/src/tree/unranked/UnrankedTree.h
@@ -169,7 +169,7 @@ int UnrankedTree < SymbolType >::compare ( const UnrankedTree & other ) const {
 	auto first = std::tie ( content, getAlphabet() );
 	auto second = std::tie ( other.content, other.getAlphabet() );
 
-	std::compare < decltype ( first ) > comp;
+	static std::compare < decltype ( first ) > comp;
 
 	return comp ( first, second );
 }
-- 
GitLab