diff --git a/alib2data/src/alphabet/BarSymbol.h b/alib2data/src/alphabet/BarSymbol.h
index 1368321a3c2eb3fd574c985c49e95cde113ae798..8c0a0504d4e1dd8cc4bd2f967e8c7da2bf5e64c9 100644
--- a/alib2data/src/alphabet/BarSymbol.h
+++ b/alib2data/src/alphabet/BarSymbol.h
@@ -42,4 +42,15 @@ public:
 
 } /* namespace alphabet */
 
+namespace std {
+
+template<>
+struct compare<alphabet::BarSymbol> {
+	int operator()(const alphabet::BarSymbol& first, const alphabet::BarSymbol& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* BAR_SYMBOL_H_ */
diff --git a/alib2data/src/alphabet/BlankSymbol.h b/alib2data/src/alphabet/BlankSymbol.h
index 962095050e8e1beda4869fc4ce7b2d97d8bd7833..29d0a20a094f02d91f8cddab2d911388edef6709 100644
--- a/alib2data/src/alphabet/BlankSymbol.h
+++ b/alib2data/src/alphabet/BlankSymbol.h
@@ -42,4 +42,15 @@ public:
 
 } /* namespace alphabet */
 
+namespace std {
+
+template<>
+struct compare<alphabet::BlankSymbol> {
+	int operator()(const alphabet::BlankSymbol& first, const alphabet::BlankSymbol& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* BLANK_SYMBOL_H_ */
diff --git a/alib2data/src/alphabet/BottomOfTheStackSymbol.h b/alib2data/src/alphabet/BottomOfTheStackSymbol.h
index 3494fcbf2799a5b65410b58ba40291d8da0586a1..af7f4c569a3834f7d3f81b5bc82c227f772d9749 100644
--- a/alib2data/src/alphabet/BottomOfTheStackSymbol.h
+++ b/alib2data/src/alphabet/BottomOfTheStackSymbol.h
@@ -42,4 +42,15 @@ public:
 
 } /* namespace alphabet */
 
+namespace std {
+
+template<>
+struct compare<alphabet::BottomOfTheStackSymbol> {
+	int operator()(const alphabet::BottomOfTheStackSymbol& first, const alphabet::BottomOfTheStackSymbol& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* BOTTOM_OF_THE_STACK_SYMBOL_H_ */
diff --git a/alib2data/src/alphabet/EndSymbol.h b/alib2data/src/alphabet/EndSymbol.h
index 49e07097a38b0fb0f83b7ea20dec418b2aaf1538..476e864e807ccef42230e6c65cf47b9f31efdb2e 100644
--- a/alib2data/src/alphabet/EndSymbol.h
+++ b/alib2data/src/alphabet/EndSymbol.h
@@ -42,4 +42,15 @@ public:
 
 } /* namespace alphabet */
 
+namespace std {
+
+template<>
+struct compare<alphabet::EndSymbol> {
+	int operator()(const alphabet::EndSymbol& first, const alphabet::EndSymbol& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* END_SYMBOL_H_ */
diff --git a/alib2data/src/alphabet/LabeledSymbol.h b/alib2data/src/alphabet/LabeledSymbol.h
index e3ef61a405f16f9e7cf8c97f46b9d8e60e2a265d..528bb40dd0051a7adffd94a25634e6357d971952 100644
--- a/alib2data/src/alphabet/LabeledSymbol.h
+++ b/alib2data/src/alphabet/LabeledSymbol.h
@@ -55,4 +55,15 @@ public:
 
 } /* namespace alphabet */
 
+namespace std {
+
+template<>
+struct compare<alphabet::LabeledSymbol> {
+	int operator()(const alphabet::LabeledSymbol& first, const alphabet::LabeledSymbol& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* LABELED_SYMBOL_H_ */
diff --git a/alib2data/src/alphabet/RankedBarSymbol.h b/alib2data/src/alphabet/RankedBarSymbol.h
index 64e7e598adaf5770a5df484bb7b622e3a6d96a62..ca40d8622e2bcbdb023274a58ee24cf5dedd1a2c 100644
--- a/alib2data/src/alphabet/RankedBarSymbol.h
+++ b/alib2data/src/alphabet/RankedBarSymbol.h
@@ -48,4 +48,15 @@ public:
 
 } /* namespace alphabet */
 
+namespace std {
+
+template<>
+struct compare<alphabet::RankedBarSymbol> {
+	int operator()(const alphabet::RankedBarSymbol& first, const alphabet::RankedBarSymbol& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* RANKED_BAR_SYMBOL_H_ */
diff --git a/alib2data/src/alphabet/RankedSymbol.h b/alib2data/src/alphabet/RankedSymbol.h
index e759a42fc49537af39cf44b444436336deee827d..9f1ad0d3aae74364b8c0f53df98fed4303a3c61b 100644
--- a/alib2data/src/alphabet/RankedSymbol.h
+++ b/alib2data/src/alphabet/RankedSymbol.h
@@ -63,4 +63,15 @@ public:
 
 } /* namespace alphabet */
 
+namespace std {
+
+template<>
+struct compare<alphabet::RankedSymbol> {
+	int operator()(const alphabet::RankedSymbol& first, const alphabet::RankedSymbol& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* RANKED_SYMBOL_H_ */
diff --git a/alib2data/src/alphabet/SubtreeWildcardSymbol.h b/alib2data/src/alphabet/SubtreeWildcardSymbol.h
index c9bcb75b2e70190839827e67ca32646d7b05754d..5a8e9c31c7a0e7131b4cab8e17ef087e9c3f4f87 100644
--- a/alib2data/src/alphabet/SubtreeWildcardSymbol.h
+++ b/alib2data/src/alphabet/SubtreeWildcardSymbol.h
@@ -42,4 +42,15 @@ public:
 
 } /* namespace alphabet */
 
+namespace std {
+
+template<>
+struct compare<alphabet::SubtreeWildcardSymbol> {
+	int operator()(const alphabet::SubtreeWildcardSymbol& first, const alphabet::SubtreeWildcardSymbol& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* SUBTREE_WILDCARD_SYMBOL_H_ */
diff --git a/alib2data/src/alphabet/SymbolBase.h b/alib2data/src/alphabet/SymbolBase.h
index 68b50edefa4f773b34f82d7874170551519f63cc..45dd60bf9dd98bc6e24fc7c08c31cca7007809f4 100644
--- a/alib2data/src/alphabet/SymbolBase.h
+++ b/alib2data/src/alphabet/SymbolBase.h
@@ -34,4 +34,15 @@ public:
 
 } /* namespace alphabet */
 
+namespace std {
+
+template<>
+struct compare<alphabet::SymbolBase> {
+	int operator()(const alphabet::SymbolBase& first, const alphabet::SymbolBase& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* SYMBOL_BASE_H_ */
diff --git a/alib2data/src/automaton/AutomatonBase.h b/alib2data/src/automaton/AutomatonBase.h
index ff3d4c3249d4d49edf9efd8b5ed16a1272709fc8..1b3dd4fbdc6b81db44b078f33f9ca54a0cbce30e 100644
--- a/alib2data/src/automaton/AutomatonBase.h
+++ b/alib2data/src/automaton/AutomatonBase.h
@@ -180,5 +180,16 @@ class VisitableConstDeterministicAutomatonBase : public VisitableAutomatonBase::
 
 } /* namespace automaton */
 
+namespace std {
+
+template<>
+struct compare<automaton::AutomatonBase> {
+	int operator()(const automaton::AutomatonBase& first, const automaton::AutomatonBase& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* AUTOMATON_BASE_H_ */
 
diff --git a/alib2data/src/automaton/FSM/CompactNFA.cpp b/alib2data/src/automaton/FSM/CompactNFA.cpp
index e57181fdb3b78be73359d9877476a1e491f5390e..fa9ba83f73528742bfcba5c37b0ef4dfed4a2fcb 100644
--- a/alib2data/src/automaton/FSM/CompactNFA.cpp
+++ b/alib2data/src/automaton/FSM/CompactNFA.cpp
@@ -169,15 +169,25 @@ int CompactNFA::compare(const ObjectBase& other) const {
 }
 
 int CompactNFA::compare(const CompactNFA& other) const {
-	auto first = std::tie(states, inputAlphabet, initialState, finalStates, transitions);
-	auto second = std::tie(other.states, other.inputAlphabet, other.initialState, other.finalStates, other.transitions);
-	if(first == second) {
-		return 0;
-	} else if(first < second) {
-		return -1;
-	} else {
-		return 1;
+	std::compare<decltype(states)> comp;
+	int res = comp(states, other.states);
+	if(res == 0) {
+		std::compare<decltype(inputAlphabet)> comp;
+		res = comp(inputAlphabet, other.inputAlphabet);
 	}
+	if(res == 0) {
+		std::compare<decltype(initialState)> comp;
+		res = comp(initialState, other.initialState);
+	}
+	if(res == 0) {
+		std::compare<decltype(finalStates)> comp;
+		res = comp(finalStates, other.finalStates);
+	}
+	if(res == 0) {
+		std::compare<decltype(transitions)> comp;
+		res = comp(transitions, other.transitions);
+	}
+	return res;
 }
 
 void CompactNFA::operator>>(std::ostream& out) const {
diff --git a/alib2data/src/automaton/FSM/CompactNFA.h b/alib2data/src/automaton/FSM/CompactNFA.h
index 22f0ac7c09e421e25297505c5b2660272d4b7070..0c7284a17e5f6cf30a96638c81d63355dcbc94ed 100644
--- a/alib2data/src/automaton/FSM/CompactNFA.h
+++ b/alib2data/src/automaton/FSM/CompactNFA.h
@@ -93,4 +93,15 @@ public:
 
 } /* namespace automaton */
 
+namespace std {
+
+template<>
+struct compare<automaton::CompactNFA> {
+	int operator()(const automaton::CompactNFA& first, const automaton::CompactNFA& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* COMPACT_DFA_H_ */
diff --git a/alib2data/src/automaton/FSM/DFA.h b/alib2data/src/automaton/FSM/DFA.h
index 3059c4d7755b7ed3609a613afd1bc5bac44949d7..1fb39a450cb13c588ed953f379f9682556645138 100644
--- a/alib2data/src/automaton/FSM/DFA.h
+++ b/alib2data/src/automaton/FSM/DFA.h
@@ -94,4 +94,15 @@ public:
 
 } /* namespace automaton */
 
+namespace std {
+
+template<>
+struct compare<automaton::DFA> {
+	int operator()(const automaton::DFA& first, const automaton::DFA& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* DFA_H_ */
diff --git a/alib2data/src/automaton/FSM/EpsilonNFA.h b/alib2data/src/automaton/FSM/EpsilonNFA.h
index 22aabff97a90e99d4206cd410daa3af79f6513b6..479b739d6b70685304af0a278009b44cb41b118a 100644
--- a/alib2data/src/automaton/FSM/EpsilonNFA.h
+++ b/alib2data/src/automaton/FSM/EpsilonNFA.h
@@ -172,4 +172,15 @@ public:
 
 } /* namespace automaton */
 
+namespace std {
+
+template<>
+struct compare<automaton::EpsilonNFA> {
+	int operator()(const automaton::EpsilonNFA& first, const automaton::EpsilonNFA& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* EPSILON_NFA_H_ */
diff --git a/alib2data/src/automaton/FSM/ExtendedNFA.h b/alib2data/src/automaton/FSM/ExtendedNFA.h
index 375f682c4a0d97aedb600fc2c38a0d68901c751e..2f01c40289809822ab0d376c912efcd153638649 100644
--- a/alib2data/src/automaton/FSM/ExtendedNFA.h
+++ b/alib2data/src/automaton/FSM/ExtendedNFA.h
@@ -95,4 +95,15 @@ public:
 
 } /* namespace automaton */
 
+namespace std {
+
+template<>
+struct compare<automaton::ExtendedNFA> {
+	int operator()(const automaton::ExtendedNFA& first, const automaton::ExtendedNFA& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* EXTENDED_NFA_H_ */
diff --git a/alib2data/src/automaton/FSM/MultiInitialStateNFA.h b/alib2data/src/automaton/FSM/MultiInitialStateNFA.h
index bef36397b1725896919c0754f226246822dff347..82192f4e7381675041d5b33123dc3ef29b5972d4 100644
--- a/alib2data/src/automaton/FSM/MultiInitialStateNFA.h
+++ b/alib2data/src/automaton/FSM/MultiInitialStateNFA.h
@@ -111,4 +111,15 @@ public:
 
 } /* namespace automaton */
 
+namespace std {
+
+template<>
+struct compare<automaton::MultiInitialStateNFA> {
+	int operator()(const automaton::MultiInitialStateNFA& first, const automaton::MultiInitialStateNFA& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* MULTI_INITIAL_STATE_NFA_H_ */
diff --git a/alib2data/src/automaton/FSM/NFA.h b/alib2data/src/automaton/FSM/NFA.h
index c998bad2e75742c90cd407edeb898a1b7e5b4db6..3fb615aed188ba8ea92f37ba9eb9ca0c2fade2be 100644
--- a/alib2data/src/automaton/FSM/NFA.h
+++ b/alib2data/src/automaton/FSM/NFA.h
@@ -109,4 +109,15 @@ public:
 
 } /* namespace automaton */
 
+namespace std {
+
+template<>
+struct compare<automaton::NFA> {
+	int operator()(const automaton::NFA& first, const automaton::NFA& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* NFA_H_ */
diff --git a/alib2data/src/automaton/PDA/DPDA.h b/alib2data/src/automaton/PDA/DPDA.h
index 4a3b2cba81794753aa2a3e208178a37134aba924..e5a8eafbc75925c805e581844180cebb2be0a1bf 100644
--- a/alib2data/src/automaton/PDA/DPDA.h
+++ b/alib2data/src/automaton/PDA/DPDA.h
@@ -105,4 +105,15 @@ public:
 
 } /* namespace automaton */
 
+namespace std {
+
+template<>
+struct compare<automaton::DPDA> {
+	int operator()(const automaton::DPDA& first, const automaton::DPDA& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* DPDA_H_ */
diff --git a/alib2data/src/automaton/PDA/InputDrivenNPDA.h b/alib2data/src/automaton/PDA/InputDrivenNPDA.h
index 1054c421a418c5010c7c55f2d338f4df52864ba5..b841f4c819c7e47de53841b3dd72fcb45481e1b8 100644
--- a/alib2data/src/automaton/PDA/InputDrivenNPDA.h
+++ b/alib2data/src/automaton/PDA/InputDrivenNPDA.h
@@ -102,4 +102,15 @@ public:
 
 } /* namespace automaton */
 
+namespace std {
+
+template<>
+struct compare<automaton::InputDrivenNPDA> {
+	int operator()(const automaton::InputDrivenNPDA& first, const automaton::InputDrivenNPDA& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* INPUT_DRIVEN_NPDA_H_ */
diff --git a/alib2data/src/automaton/PDA/NPDA.h b/alib2data/src/automaton/PDA/NPDA.h
index dbaf1b76d14f286dcbd5cad1e60d7174ca4dff10..f0148973096808d0126e73bb9c87e661df0bceb6 100644
--- a/alib2data/src/automaton/PDA/NPDA.h
+++ b/alib2data/src/automaton/PDA/NPDA.h
@@ -89,4 +89,15 @@ public:
 
 } /* namespace automaton */
 
+namespace std {
+
+template<>
+struct compare<automaton::NPDA> {
+	int operator()(const automaton::NPDA& first, const automaton::NPDA& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* NPDA_H_ */
diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h
index 772e86ac0228fb4833f2ad21a125441a7b3b337e..b27b051b7a9c4978c3666678a10ad72df4c33587 100644
--- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h
+++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h
@@ -132,4 +132,15 @@ public:
 
 } /* namespace automaton */
 
+namespace std {
+
+template<>
+struct compare<automaton::RealTimeHeightDeterministicDPDA> {
+	int operator()(const automaton::RealTimeHeightDeterministicDPDA& first, const automaton::RealTimeHeightDeterministicDPDA& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* REAL_TIME_HEIGHT_DETERMINISTIC_DPDA_H_ */
diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h
index bf74a0fb6f612d9ea5631b6137a3c752b995b465..165381a83c584a6b1073ad22d932570e9576b576 100644
--- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h
+++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h
@@ -132,4 +132,15 @@ public:
 
 } /* namespace automaton */
 
+namespace std {
+
+template<>
+struct compare<automaton::RealTimeHeightDeterministicNPDA> {
+	int operator()(const automaton::RealTimeHeightDeterministicNPDA& first, const automaton::RealTimeHeightDeterministicNPDA& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* REAL_TIME_HEIGHT_DETERMINISTIC_NPDA_H_ */
diff --git a/alib2data/src/automaton/PDA/SinglePopDPDA.h b/alib2data/src/automaton/PDA/SinglePopDPDA.h
index 0601a411a4c11e954cdd2d07d1347001233071db..7b100c775d6b519c23b99fe3585b029e8fc6a553 100644
--- a/alib2data/src/automaton/PDA/SinglePopDPDA.h
+++ b/alib2data/src/automaton/PDA/SinglePopDPDA.h
@@ -95,4 +95,15 @@ public:
 
 } /* namespace automaton */
 
+namespace std {
+
+template<>
+struct compare<automaton::SinglePopDPDA> {
+	int operator()(const automaton::SinglePopDPDA& first, const automaton::SinglePopDPDA& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* SINGLE_POP_DPDA_H_ */
diff --git a/alib2data/src/automaton/PDA/SinglePopNPDA.h b/alib2data/src/automaton/PDA/SinglePopNPDA.h
index cfb143ee806ba70861b1224002423878674721eb..43b833db66bafd35e3cabe54de8b0eac5c9d86ab 100644
--- a/alib2data/src/automaton/PDA/SinglePopNPDA.h
+++ b/alib2data/src/automaton/PDA/SinglePopNPDA.h
@@ -89,4 +89,15 @@ public:
 
 } /* namespace automaton */
 
+namespace std {
+
+template<>
+struct compare<automaton::SinglePopNPDA> {
+	int operator()(const automaton::SinglePopNPDA& first, const automaton::SinglePopNPDA& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* SINGLE_POP_NPDA_H_ */
diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h
index 5337610be8a2c03992310bafbac576c38923e2c3..f44bf960fa8ea734871cc048114b30c400a15a23 100644
--- a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h
+++ b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h
@@ -118,4 +118,15 @@ public:
 
 } /* namespace automaton */
 
+namespace std {
+
+template<>
+struct compare<automaton::VisiblyPushdownDPDA> {
+	int operator()(const automaton::VisiblyPushdownDPDA& first, const automaton::VisiblyPushdownDPDA& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* VISIBLY_PUSHDOWN_DPDA_H_ */
diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h
index 90fcae5106d101e415e1e759f16b68d781e5f714..6aa153fe96da5175fbabc01f82f82074d1058716 100644
--- a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h
+++ b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h
@@ -118,4 +118,15 @@ public:
 
 } /* namespace automaton */
 
+namespace std {
+
+template<>
+struct compare<automaton::VisiblyPushdownNPDA> {
+	int operator()(const automaton::VisiblyPushdownNPDA& first, const automaton::VisiblyPushdownNPDA& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* VISIBLY_PUSHDOWN_NPDA_H_ */
diff --git a/alib2data/src/automaton/TM/OneTapeDTM.h b/alib2data/src/automaton/TM/OneTapeDTM.h
index b8da5bdc4c6b025730d9388fd92353e1e956925c..c2590e3da0ce4005371ee6b9167a49aa5a602c1b 100644
--- a/alib2data/src/automaton/TM/OneTapeDTM.h
+++ b/alib2data/src/automaton/TM/OneTapeDTM.h
@@ -87,4 +87,15 @@ public:
 
 } /* namespace automaton */
 
+namespace std {
+
+template<>
+struct compare<automaton::OneTapeDTM> {
+	int operator()(const automaton::OneTapeDTM& first, const automaton::OneTapeDTM& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* ONE_TAPE_DTM_H_ */
diff --git a/alib2data/src/container/ContainerBase.h b/alib2data/src/container/ContainerBase.h
index 66c2ab8905f9a30ff2aa11bc8aae3197ee607b11..58ae13185cb3f97ec58c76bc6c098efae746d4e3 100644
--- a/alib2data/src/container/ContainerBase.h
+++ b/alib2data/src/container/ContainerBase.h
@@ -37,4 +37,15 @@ public:
 
 } /* namespace container */
 
+namespace std {
+
+template<>
+struct compare<container::ContainerBase> {
+	int operator()(const container::ContainerBase& first, const container::ContainerBase& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* CONTAINER_BASE_H_ */
diff --git a/alib2data/src/container/ObjectsMap.h b/alib2data/src/container/ObjectsMap.h
index fbb2820190faa620f4ea8a0035a494fa2010e562..75864401db05aabfe735735d650313e753a90b76 100644
--- a/alib2data/src/container/ObjectsMap.h
+++ b/alib2data/src/container/ObjectsMap.h
@@ -40,4 +40,15 @@ public:
 
 } /* namespace container */
 
+namespace std {
+
+template<>
+struct compare<container::ObjectsMap> {
+	int operator()(const container::ObjectsMap& first, const container::ObjectsMap& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* OBJECTS_MAP_H_ */
diff --git a/alib2data/src/container/ObjectsPair.h b/alib2data/src/container/ObjectsPair.h
index 484a637ec115cd9b5d965a04f2dc41c332631a31..65651ce1c30fcb6426269bd83467047d275cd7a3 100644
--- a/alib2data/src/container/ObjectsPair.h
+++ b/alib2data/src/container/ObjectsPair.h
@@ -42,4 +42,15 @@ public:
 
 } /* namespace container */
 
+namespace std {
+
+template<>
+struct compare<container::ObjectsPair> {
+	int operator()(const container::ObjectsPair& first, const container::ObjectsPair& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* OBJECTS_PAIR_H_ */
diff --git a/alib2data/src/container/ObjectsSet.h b/alib2data/src/container/ObjectsSet.h
index 35382caddf71b9aa1c12953d0f9d8e4ac5a6fad5..c704bc77c1b6cf79b8584d361c43cdbe055bb904 100644
--- a/alib2data/src/container/ObjectsSet.h
+++ b/alib2data/src/container/ObjectsSet.h
@@ -40,4 +40,15 @@ public:
 
 } /* namespace container */
 
+namespace std {
+
+template<>
+struct compare<container::ObjectsSet> {
+	int operator()(const container::ObjectsSet& first, const container::ObjectsSet& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* OBJECTS_SET_H_ */
diff --git a/alib2data/src/container/ObjectsVector.h b/alib2data/src/container/ObjectsVector.h
index da7c1373bb342bc2a6e681212f2f669e91a767aa..7d372d2383703e639d2cae4c32911a3289e64a39 100644
--- a/alib2data/src/container/ObjectsVector.h
+++ b/alib2data/src/container/ObjectsVector.h
@@ -40,4 +40,15 @@ public:
 
 } /* namespace container */
 
+namespace std {
+
+template<>
+struct compare<container::ObjectsVector> {
+	int operator()(const container::ObjectsVector& first, const container::ObjectsVector& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* OBJECTS_VECTOR_H_ */
diff --git a/alib2data/src/exception/AlibException.h b/alib2data/src/exception/AlibException.h
index 8cadc496a54d86f62997a9e1d4d7d3c547c8bda7..f68892c08f0726702fba0f49985bccbd4cca2983 100644
--- a/alib2data/src/exception/AlibException.h
+++ b/alib2data/src/exception/AlibException.h
@@ -67,4 +67,15 @@ public:
 
 } /* namespace exception */
 
+namespace std {
+
+template<>
+struct compare<::exception::AlibException> {
+	int operator()(const ::exception::AlibException& first, const ::exception::AlibException& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* ALIB_EXCEPTION_H_ */
diff --git a/alib2data/src/grammar/ContextFree/CFG.h b/alib2data/src/grammar/ContextFree/CFG.h
index afb714ca865cc61b2678a72bfd4ed1cdd401f969..720f5f89a3c5affb9888e51694a11d92202a58d1 100644
--- a/alib2data/src/grammar/ContextFree/CFG.h
+++ b/alib2data/src/grammar/ContextFree/CFG.h
@@ -61,4 +61,15 @@ public:
 
 } /* namespace grammar */
 
+namespace std {
+
+template<>
+struct compare<grammar::CFG> {
+	int operator()(const grammar::CFG& first, const grammar::CFG& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* CFG_H_ */
diff --git a/alib2data/src/grammar/ContextFree/CNF.h b/alib2data/src/grammar/ContextFree/CNF.h
index e972f0eda3163bf1faf20fd3a2c9f22ca54c60a8..eca8d06616c3334953ef44bae7713ab059ca67a8 100644
--- a/alib2data/src/grammar/ContextFree/CNF.h
+++ b/alib2data/src/grammar/ContextFree/CNF.h
@@ -70,4 +70,15 @@ public:
 
 } /* namespace grammar */
 
+namespace std {
+
+template<>
+struct compare<grammar::CNF> {
+	int operator()(const grammar::CNF& first, const grammar::CNF& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* CNF_H_ */
diff --git a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h
index 17addf33f2114099c3134c67fdcbbd9ee7cb7151..1f07c6f2bd7e240d5b08d109f9442a4afdb3d9ee 100644
--- a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h
+++ b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h
@@ -65,4 +65,15 @@ public:
 
 } /* namespace grammar */
 
+namespace std {
+
+template<>
+struct compare<grammar::EpsilonFreeCFG> {
+	int operator()(const grammar::EpsilonFreeCFG& first, const grammar::EpsilonFreeCFG& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* EPSILON_FREE_CFG_H_ */
diff --git a/alib2data/src/grammar/ContextFree/GNF.h b/alib2data/src/grammar/ContextFree/GNF.h
index 6858955ce159443f95660a007fc753c082f4fe7a..da0fa45949aa555e3b57bde16a058782e801e72b 100644
--- a/alib2data/src/grammar/ContextFree/GNF.h
+++ b/alib2data/src/grammar/ContextFree/GNF.h
@@ -64,4 +64,15 @@ public:
 
 } /* namespace grammar */
 
+namespace std {
+
+template<>
+struct compare<grammar::GNF> {
+	int operator()(const grammar::GNF& first, const grammar::GNF& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* GNF_H_ */
diff --git a/alib2data/src/grammar/ContextFree/LG.h b/alib2data/src/grammar/ContextFree/LG.h
index c531f4a59a2228125fd12744abd4f93f584b847c..5e7a233d7cf5b2f0e710d8a497c8730898b8a305 100644
--- a/alib2data/src/grammar/ContextFree/LG.h
+++ b/alib2data/src/grammar/ContextFree/LG.h
@@ -66,4 +66,15 @@ public:
 
 } /* namespace grammar */
 
+namespace std {
+
+template<>
+struct compare<grammar::LG> {
+	int operator()(const grammar::LG& first, const grammar::LG& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* LG_H_ */
diff --git a/alib2data/src/grammar/ContextSensitive/CSG.h b/alib2data/src/grammar/ContextSensitive/CSG.h
index 0427a348b631984e236cbb1a582a2ac954cd03bd..15f7f56915ef1b90e6519c51a6ef46cdf7ee59cb 100644
--- a/alib2data/src/grammar/ContextSensitive/CSG.h
+++ b/alib2data/src/grammar/ContextSensitive/CSG.h
@@ -58,4 +58,15 @@ public:
 
 } /* namespace grammar */
 
+namespace std {
+
+template<>
+struct compare<grammar::CSG> {
+	int operator()(const grammar::CSG& first, const grammar::CSG& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* CSG_H_ */
diff --git a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h
index fd20c2138138aa8cf1670d4d6f8014e81bd92da2..d89d141ec8b83c168e201113ce227a011b46ed29 100644
--- a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h
+++ b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h
@@ -58,4 +58,15 @@ public:
 
 } /* namespace grammar */
 
+namespace std {
+
+template<>
+struct compare<grammar::NonContractingGrammar> {
+	int operator()(const grammar::NonContractingGrammar& first, const grammar::NonContractingGrammar& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* NON_CONTRACTING_GRAMMAR_H_ */
diff --git a/alib2data/src/grammar/GrammarBase.h b/alib2data/src/grammar/GrammarBase.h
index 9ad26cb132a22477edd1c2dfb9d6c146baa246b8..0777ad1f82a22c9ac904450deef69c02e7b845a3 100644
--- a/alib2data/src/grammar/GrammarBase.h
+++ b/alib2data/src/grammar/GrammarBase.h
@@ -84,5 +84,16 @@ class VisitableConstRGBase : public VisitableGrammarBase::const_visitor_type {
 
 } /* namespace grammar */
 
+namespace std {
+
+template<>
+struct compare<grammar::GrammarBase> {
+	int operator()(const grammar::GrammarBase& first, const grammar::GrammarBase& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* GRAMMAR_BASE_H_ */
 
diff --git a/alib2data/src/grammar/Regular/LeftLG.h b/alib2data/src/grammar/Regular/LeftLG.h
index 95e46cb3559ffce26fbb8c8d20890d9ce2edf6db..b7efe183de36ec3675bccebfa222682148779fce 100644
--- a/alib2data/src/grammar/Regular/LeftLG.h
+++ b/alib2data/src/grammar/Regular/LeftLG.h
@@ -65,4 +65,15 @@ public:
 
 } /* namespace grammar */
 
+namespace std {
+
+template<>
+struct compare<grammar::LeftLG> {
+	int operator()(const grammar::LeftLG& first, const grammar::LeftLG& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* LEFT_LG_H_ */
diff --git a/alib2data/src/grammar/Regular/LeftRG.h b/alib2data/src/grammar/Regular/LeftRG.h
index acfcd932bafc04deade7c65e27f8e90484c8ab62..88e4c3a338e2e453349e80607b949ca91fffeec5 100644
--- a/alib2data/src/grammar/Regular/LeftRG.h
+++ b/alib2data/src/grammar/Regular/LeftRG.h
@@ -153,4 +153,15 @@ public:
 
 } /* namespace grammar */
 
+namespace std {
+
+template<>
+struct compare<grammar::LeftRG> {
+	int operator()(const grammar::LeftRG& first, const grammar::LeftRG& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* LEFT_RG_H_ */
diff --git a/alib2data/src/grammar/Regular/RightLG.h b/alib2data/src/grammar/Regular/RightLG.h
index fd13d01a822a894daa3aa28509b9c7d527fb426f..d2ba02c50c624155b0a6986201efabb194c56db0 100644
--- a/alib2data/src/grammar/Regular/RightLG.h
+++ b/alib2data/src/grammar/Regular/RightLG.h
@@ -65,4 +65,15 @@ public:
 
 } /* namespace grammar */
 
+namespace std {
+
+template<>
+struct compare<grammar::RightLG> {
+	int operator()(const grammar::RightLG& first, const grammar::RightLG& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* RIGHT_LG_H_ */
diff --git a/alib2data/src/grammar/Regular/RightRG.h b/alib2data/src/grammar/Regular/RightRG.h
index 0580625a7f35016dfd37ec802f50bebc8b8d89f1..eea1c9c595e389402a01880108612bd0f01c8cb3 100644
--- a/alib2data/src/grammar/Regular/RightRG.h
+++ b/alib2data/src/grammar/Regular/RightRG.h
@@ -85,4 +85,15 @@ public:
 
 } /* namespace grammar */
 
+namespace std {
+
+template<>
+struct compare<grammar::RightRG> {
+	int operator()(const grammar::RightRG& first, const grammar::RightRG& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* RIGHT_RG_H_ */
diff --git a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h
index c781aded6616c59d5aac7510541fb34008eae00f..14c86b9ec22313789092ac7d201e1fcdf2dad34f 100644
--- a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h
+++ b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h
@@ -54,4 +54,15 @@ public:
 
 } /* namespace grammar */
 
+namespace std {
+
+template<>
+struct compare<grammar::ContextPreservingUnrestrictedGrammar> {
+	int operator()(const grammar::ContextPreservingUnrestrictedGrammar& first, const grammar::ContextPreservingUnrestrictedGrammar& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* CONTEXT_PRESERVING_UNRESTRICTED_GRAMMAR_H_ */
diff --git a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h
index d0b66dbe25a8bda8d581b360704b187f1f5f976e..2a445e12b0211bdf933e74a807d116c94603d2b9 100644
--- a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h
+++ b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h
@@ -54,4 +54,15 @@ public:
 
 } /* namespace grammar */
 
+namespace std {
+
+template<>
+struct compare<grammar::UnrestrictedGrammar> {
+	int operator()(const grammar::UnrestrictedGrammar& first, const grammar::UnrestrictedGrammar& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* UNRESTRICTED_GRAMMAR_H_ */
diff --git a/alib2data/src/label/HexavigesimalLabel.h b/alib2data/src/label/HexavigesimalLabel.h
index 57494ab60c3c3c311d822f025c820f69f59db3a5..2987991840d37c49fc98a13d5ba6c5c6e65a88ac 100644
--- a/alib2data/src/label/HexavigesimalLabel.h
+++ b/alib2data/src/label/HexavigesimalLabel.h
@@ -52,5 +52,16 @@ public:
 
 } /* namespace label */
 
+namespace std {
+
+template<>
+struct compare<label::HexavigesimalLabel> {
+	int operator()(const label::HexavigesimalLabel& first, const label::HexavigesimalLabel& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* HEXAVIGESIMAL_LABEL_H_ */
 
diff --git a/alib2data/src/label/LabelBase.h b/alib2data/src/label/LabelBase.h
index 1fea94675d052263aa48215a5935623e21cce3ec..9fd5af9db437674799a2a45c995f1afd55ce5ad6 100644
--- a/alib2data/src/label/LabelBase.h
+++ b/alib2data/src/label/LabelBase.h
@@ -34,5 +34,16 @@ public:
 
 } /* namespace label */
 
+namespace std {
+
+template<>
+struct compare<label::LabelBase> {
+	int operator()(const label::LabelBase& first, const label::LabelBase& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* LABEL_BASE_H_ */
 
diff --git a/alib2data/src/label/LabelPairLabel.h b/alib2data/src/label/LabelPairLabel.h
index aeb32623e1b07ab50dad2b0223757c662f897533..e2d9a8ddccfa3c0d1c3c270e4aa2948ed6474cd4 100644
--- a/alib2data/src/label/LabelPairLabel.h
+++ b/alib2data/src/label/LabelPairLabel.h
@@ -56,5 +56,16 @@ public:
 
 } /* namespace label */
 
+namespace std {
+
+template<>
+struct compare<label::LabelPairLabel> {
+	int operator()(const label::LabelPairLabel& first, const label::LabelPairLabel& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* LABEL_PAIR_LABEL_H_ */
 
diff --git a/alib2data/src/label/LabelSetLabel.h b/alib2data/src/label/LabelSetLabel.h
index 2bc5b77d608cf3a9ba22bb5d08c8f9cbf73a407a..951d106b9c140bb34a72ec45c178bf505a12ad2a 100644
--- a/alib2data/src/label/LabelSetLabel.h
+++ b/alib2data/src/label/LabelSetLabel.h
@@ -56,5 +56,16 @@ public:
 
 } /* namespace label */
 
+namespace std {
+
+template<>
+struct compare<label::LabelSetLabel> {
+	int operator()(const label::LabelSetLabel& first, const label::LabelSetLabel& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* LABEL_SET_LABEL_H_ */
 
diff --git a/alib2data/src/label/ObjectLabel.h b/alib2data/src/label/ObjectLabel.h
index d5485d6c517ea4a4964cdd52326fdc5fb64a6c41..f57b0553d93e7596aeb76dce03fd20a6fc5b9d72 100644
--- a/alib2data/src/label/ObjectLabel.h
+++ b/alib2data/src/label/ObjectLabel.h
@@ -55,4 +55,15 @@ public:
 
 } /* namespace label */
 
+namespace std {
+
+template<>
+struct compare<label::ObjectLabel> {
+	int operator()(const label::ObjectLabel& first, const label::ObjectLabel& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* OBJECT_LABEL_H_ */
diff --git a/alib2data/src/label/PrimitiveLabel.h b/alib2data/src/label/PrimitiveLabel.h
index 6faa087a128f45e4de7edf0dcc6376f2124357b2..ed447b33cec5a469f82ffacb8a6c6676ef098bfe 100644
--- a/alib2data/src/label/PrimitiveLabel.h
+++ b/alib2data/src/label/PrimitiveLabel.h
@@ -54,5 +54,16 @@ public:
 
 } /* namespace label */
 
+namespace std {
+
+template<>
+struct compare<label::PrimitiveLabel> {
+	int operator()(const label::PrimitiveLabel& first, const label::PrimitiveLabel& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* PRIMITIVE_LABEL_H_ */
 
diff --git a/alib2data/src/object/Void.h b/alib2data/src/object/Void.h
index 1218433d7d9d66d514db80450b081ab0a2360c4e..7a47c43f9bfd717579606d8b3889943e7a2fcab9 100644
--- a/alib2data/src/object/Void.h
+++ b/alib2data/src/object/Void.h
@@ -44,4 +44,15 @@ public:
 
 } /* namespace alib */
 
+namespace std {
+
+template<>
+struct compare<alib::Void> {
+	int operator()(const alib::Void& first, const alib::Void& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* VOID_H_ */
diff --git a/alib2data/src/primitive/Character.h b/alib2data/src/primitive/Character.h
index f36c11e0cc1716f044a82869596f06d02d0a67ab..2edfe63ce5a7b97535f3101e3b1c4a40018822ea 100644
--- a/alib2data/src/primitive/Character.h
+++ b/alib2data/src/primitive/Character.h
@@ -52,5 +52,16 @@ public:
 
 } /* namespace primitive */
 
+namespace std {
+
+template<>
+struct compare<primitive::Character> {
+	int operator()(const primitive::Character& first, const primitive::Character& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* PRIMITIVE_CHARACTER_H_ */
 
diff --git a/alib2data/src/primitive/Integer.h b/alib2data/src/primitive/Integer.h
index 6453e3905b9bd56f3db1a4b00fb4c1589579f27c..0b71a0c33f199cffb57fdb8d94bf38cdc787ffa7 100644
--- a/alib2data/src/primitive/Integer.h
+++ b/alib2data/src/primitive/Integer.h
@@ -52,4 +52,15 @@ public:
 
 } /* namespace primitive */
 
+namespace std {
+
+template<>
+struct compare<primitive::Integer> {
+	int operator()(const primitive::Integer& first, const primitive::Integer& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* PRIMITIVE_INTEGER_H_ */
diff --git a/alib2data/src/primitive/PrimitiveBase.h b/alib2data/src/primitive/PrimitiveBase.h
index 7a2dfe9a5fc640df7bce67e3edd4fa1cb7864f68..a408eaef254b2ef62254d2c391000adee40b5ecb 100644
--- a/alib2data/src/primitive/PrimitiveBase.h
+++ b/alib2data/src/primitive/PrimitiveBase.h
@@ -34,5 +34,16 @@ public:
 
 } /* namespace primitive */
 
+namespace std {
+
+template<>
+struct compare<primitive::PrimitiveBase> {
+	int operator()(const primitive::PrimitiveBase& first, const primitive::PrimitiveBase& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* PRIMITIVE_BASE_H_ */
 
diff --git a/alib2data/src/primitive/String.h b/alib2data/src/primitive/String.h
index dd74681d1792ab544e3d4ad1272014c4d3d66bec..1dc3f129653d041ba1c5fb2d2d575c0971984a96 100644
--- a/alib2data/src/primitive/String.h
+++ b/alib2data/src/primitive/String.h
@@ -55,5 +55,16 @@ public:
 
 } /* namespace primitive */
 
+namespace std {
+
+template<>
+struct compare<primitive::String> {
+	int operator()(const primitive::String& first, const primitive::String& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* PRIMITIVE_STRING_H_ */
 
diff --git a/alib2data/src/regexp/RegExpBase.h b/alib2data/src/regexp/RegExpBase.h
index 639c6f52a703e6e2fff69b5afd8ea3a36b2da3aa..5c34c328826bce07bf05c24c097807ff752bb8cb 100644
--- a/alib2data/src/regexp/RegExpBase.h
+++ b/alib2data/src/regexp/RegExpBase.h
@@ -33,5 +33,16 @@ public:
 
 } /* namespace regexp */
 
+namespace std {
+
+template<>
+struct compare<regexp::RegExpBase> {
+	int operator()(const regexp::RegExpBase& first, const regexp::RegExpBase& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* REG_EXP_BASE_H_ */
 
diff --git a/alib2data/src/regexp/formal/FormalRegExp.h b/alib2data/src/regexp/formal/FormalRegExp.h
index 705e59715f79f9f315c67d9db6ac34e8b994fbf4..c8045b63e2f706e71c4e8d779f4a32a1f9681687 100644
--- a/alib2data/src/regexp/formal/FormalRegExp.h
+++ b/alib2data/src/regexp/formal/FormalRegExp.h
@@ -124,4 +124,15 @@ public:
 
 } /* namespace regexp */
 
+namespace std {
+
+template<>
+struct compare<regexp::FormalRegExp> {
+	int operator()(const regexp::FormalRegExp& first, const regexp::FormalRegExp& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* FORMAL_REG_EXP_H_ */
diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExp.h b/alib2data/src/regexp/unbounded/UnboundedRegExp.h
index 934492fac8612c7cd54abba399f723e01aa74528..e6f3d531e70ffc3a0d473e612905e55adb18939a 100644
--- a/alib2data/src/regexp/unbounded/UnboundedRegExp.h
+++ b/alib2data/src/regexp/unbounded/UnboundedRegExp.h
@@ -124,4 +124,15 @@ public:
 
 } /* namespace regexp */
 
+namespace std {
+
+template<>
+struct compare<regexp::UnboundedRegExp> {
+	int operator()(const regexp::UnboundedRegExp& first, const regexp::UnboundedRegExp& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* UNBOUNDED_REG_EXP_H_ */
diff --git a/alib2data/src/std/compare.hpp b/alib2data/src/std/compare.hpp
index ff2317deac7dec11789eab46890c889c730dbd78..fbb2a3dbe46f53336edf1b9be25a8910b543e6cb 100644
--- a/alib2data/src/std/compare.hpp
+++ b/alib2data/src/std/compare.hpp
@@ -84,7 +84,7 @@ struct compare<map<T, R>> {
 
 		compare<std::pair<T, R>> comp;
 		for(auto iterF = first.begin(), iterS = second.begin(); iterF != first.end(); iterF++, iterS++) {
-			int res = compare(*iterF, *iterS);
+			int res = comp(*iterF, *iterS);
 			if(res != 0) return res;
 		}
 		return 0;
diff --git a/alib2data/src/string/CyclicString.h b/alib2data/src/string/CyclicString.h
index c85099f747439359c7c962bb415d19598d680398..0d1113a6659a6efbf23b6647a18179de92bbf693 100644
--- a/alib2data/src/string/CyclicString.h
+++ b/alib2data/src/string/CyclicString.h
@@ -69,5 +69,16 @@ public:
 
 } /* namespace string */
 
+namespace std {
+
+template<>
+struct compare<::string::CyclicString> {
+	int operator()(const ::string::CyclicString& first, const ::string::CyclicString& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* CYCLIC_STRING_H_ */
 
diff --git a/alib2data/src/string/Epsilon.h b/alib2data/src/string/Epsilon.h
index 81ecbf3202dad0aa277d0ac61309fe1f2260531d..0a2e4b3a2eb021d2ef58ddeb5c3f941deec33147 100644
--- a/alib2data/src/string/Epsilon.h
+++ b/alib2data/src/string/Epsilon.h
@@ -59,5 +59,16 @@ public:
 
 } /* namespace string */
 
+namespace std {
+
+template<>
+struct compare<::string::Epsilon> {
+	int operator()(const ::string::Epsilon& first, const ::string::Epsilon& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* EPSILON_H_ */
 
diff --git a/alib2data/src/string/LinearString.h b/alib2data/src/string/LinearString.h
index a74a468fb12640bc223bfcbedfcc9ff941623229..a6921c5225b17e811cc0009857ba78c075e85339 100644
--- a/alib2data/src/string/LinearString.h
+++ b/alib2data/src/string/LinearString.h
@@ -77,5 +77,16 @@ public:
 
 } /* namespace string */
 
+namespace std {
+
+template<>
+struct compare<::string::LinearString> {
+	int operator()(const ::string::LinearString& first, const ::string::LinearString& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* LINEAR_STRING_H_ */
 
diff --git a/alib2data/src/string/StringBase.h b/alib2data/src/string/StringBase.h
index de7461bcde6a07e06b4d00002de01830cc9b768a..cda2b7a8dc5d939f97cb24ffb4a040e735eb963c 100644
--- a/alib2data/src/string/StringBase.h
+++ b/alib2data/src/string/StringBase.h
@@ -33,5 +33,16 @@ public:
 
 } /* namespace string */
 
+namespace std {
+
+template<>
+struct compare<::string::StringBase> {
+	int operator()(const ::string::StringBase& first, const ::string::StringBase& second) const {
+		return first.compare(second);
+	}
+};
+
+} /* namespace std */
+
 #endif /* STRING_BASE_H_ */