Document the boost multiprecision shift bug in RuleList

This commit is contained in:
Alex Beregszaszi
2019-03-04 13:37:20 +01:00
parent 68e1bf47d5
commit a7c2dba681
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -140,6 +140,12 @@ inline bytes toCompactBigEndian(uint8_t _val, unsigned _min = 0)
return (_min || _val) ? bytes{ _val } : bytes{};
}
/// Workarounds shift left bug in boost <1.65.1.
template <class S> S bigintShiftLeftWorkaround(S const& _a, unsigned _b)
{
return (S)(bigint(_a) << _b);
}
/// Convenience function for conversion of a u256 to hex
inline std::string toHex(u256 val, HexPrefix prefix = HexPrefix::DontAdd)
{