From 81f24f24e6d827d45b1ae1b22e88388d30db3dd0 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Thu, 10 Jan 2019 20:29:30 +0100 Subject: Add equivalent function combiner as Yul optimizer step. --- libdevcore/CommonData.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libdevcore/CommonData.h') 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 +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)); +} + } -- cgit