aboutsummaryrefslogtreecommitdiffstats
path: root/libdevcore
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2019-01-16 18:47:57 +0800
committerGitHub <noreply@github.com>2019-01-16 18:47:57 +0800
commit778b14de260a7eeaea88867e39cfc226f1494e63 (patch)
tree9f6c74591bba65109037911c8752d9a9d8ba59c5 /libdevcore
parent82453a76a3b080c9ac467e9f98c7f82809db8c1e (diff)
parent81f24f24e6d827d45b1ae1b22e88388d30db3dd0 (diff)
downloaddexon-solidity-778b14de260a7eeaea88867e39cfc226f1494e63.tar.gz
dexon-solidity-778b14de260a7eeaea88867e39cfc226f1494e63.tar.zst
dexon-solidity-778b14de260a7eeaea88867e39cfc226f1494e63.zip
Merge pull request #5776 from ethereum/equivalentFunctionCombiner
[Yul] Equivalent function combiner.
Diffstat (limited to 'libdevcore')
-rw-r--r--libdevcore/CommonData.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libdevcore/CommonData.h b/libdevcore/CommonData.h
index 7c59c505..1d668f26 100644
--- a/libdevcore/CommonData.h
+++ b/libdevcore/CommonData.h
@@ -275,4 +275,10 @@ std::string getChecksummedAddress(std::string const& _addr);
bool isValidHex(std::string const& _string);
bool isValidDecimal(std::string const& _string);
+template<typename Container, typename Compare>
+bool containerEqual(Container const& _lhs, Container const& _rhs, Compare&& _compare)
+{
+ return std::equal(std::begin(_lhs), std::end(_lhs), std::begin(_rhs), std::end(_rhs), std::forward<Compare>(_compare));
+}
+
}