aboutsummaryrefslogtreecommitdiffstats
path: root/KnownState.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-05-12 17:25:34 +0800
committerchriseth <c@ethdev.com>2015-05-12 17:25:34 +0800
commit60d69c78f5d165341ce76f63a7e95418c95a3481 (patch)
tree7ccbdcec7ef48611f692fffd1beeed193121cb61 /KnownState.cpp
parentaafa354a958bae0070bc3ce846b121ad048c6f01 (diff)
downloaddexon-solidity-60d69c78f5d165341ce76f63a7e95418c95a3481.tar.gz
dexon-solidity-60d69c78f5d165341ce76f63a7e95418c95a3481.tar.zst
dexon-solidity-60d69c78f5d165341ce76f63a7e95418c95a3481.zip
Fixed template problem.
Diffstat (limited to 'KnownState.cpp')
-rw-r--r--KnownState.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/KnownState.cpp b/KnownState.cpp
index d6fbde2d..5a70a74f 100644
--- a/KnownState.cpp
+++ b/KnownState.cpp
@@ -162,7 +162,7 @@ KnownState::StoreOperation KnownState::feedItem(AssemblyItem const& _item, bool
/// Helper function for KnownState::reduceToCommonKnowledge, removes everything from
/// _this which is not in or not equal to the value in _other.
-template <class _Mapping, class _KeyType = ExpressionClasses::Id> void intersect(
+template <class _Mapping, class _KeyType> void intersect(
_Mapping& _this,
_Mapping const& _other,
function<_KeyType(_KeyType)> const& _keyTrans = [](_KeyType _k) { return _k; }
@@ -175,6 +175,11 @@ template <class _Mapping, class _KeyType = ExpressionClasses::Id> void intersect
it = _this.erase(it);
}
+template <class _Mapping> void intersect(_Mapping& _this, _Mapping const& _other)
+{
+ intersect<_Mapping, ExpressionClasses::Id>(_this, _other, [](ExpressionClasses::Id _k) { return _k; });
+}
+
void KnownState::reduceToCommonKnowledge(KnownState const& _other)
{
int stackDiff = m_stackHeight - _other.m_stackHeight;